use LWP::UserAgent; $ua = LWP::UserAgent->new; $ua->proxy("http", "http://proxy_host:proxy_port/"); my $req = HTTP::Request->new(GET => "http://www.google.com/"); my $res = $ua->request($req); if ($res->is_success) { print $res->content; } else { print "Bad luck this time\n"; }