访问基础LWP :: UserAgent对象并设置代理.LWP :: Simple导出$ua变量,以便您可以这样做:
$ua
use LWP::Simple qw( $ua get ); $ua->proxy( 'http', 'http://myproxy.example.com' ); my $content = get( 'http://www.example.com/' );