我正在尝试向我的 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,"\n";
}