我试图在我的perl代码中添加一个代理代码, 但我不确定这是否是正确的代码?
#!usr/bin/perl
{
use strict;
use LWP::UserAgent;
use warnings;
my $ua = new LWP::UserAgent(agent => Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.46 Safari/536.5 );
$ua->proxy([qw(http https)] => http://100.100.10.100:80 );
my $response = $ua->get("URL_IN_HERE");
print $response->code, , $response->message,"
";
}