Will you need to use authentication to get through the proxy? If so, you may run into some difficulties using the usual modules. I have had to use the CPAN module
Net::HTTPTunnel instead of any of the LWP::UserAgent modules to do this.
An example:
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 t
+he socket
my $response;
while (<$ht>) {$response .= $_;} # read response (the HTML
+web page) from the socket
close $ht; # close the socket
The page is now stored in $response, to do with as you please.