use Net::HTTPTunnel; use HTTP::Request; my $proxy_host = "192.168.1.1"; my $proxy_port = "83"; my $proxy_user = "username"; my $proxy_pass = "password"; my $ht = Net::HTTPTunnel->new( 'proxy-host' => $proxy_host, 'proxy-port' => $proxy_port, 'remote-host' => 'www.perlmonks.org', 'remote-port' => '80', 'proxy-user' => $proxy_user, 'proxy-pass' => $proxy_pass, 'timeout' => 20); $ht or die "request timed out"; # generate an HTTP request my $req = HTTP::Request->new(GET => "http://www.perlmonks.org/index.pl?node_id=317556"); print $ht $req->as_string; # print the request to the socket my $response; while (<$ht>) {$response .= $_;} # read response (the HTML web page) from the socket close $ht; # close the socket