http://www.perlmonks.org?node_id=20304


in reply to Yet another LWP question

A quick glance at `perldoc lwpcook` gives the following:
use LWP::UserAgent; $ua = new LWP::UserAgent; $ua->proxy(['http', 'ftp'] => 'http://proxy.myorg.com'); $req = new HTTP::Request 'GET',"http://www.perl.com"; $req->proxy_authorization_basic("proxy_user", "proxy_password"); $res = $ua->request($req); print $res->content if $res->is_success;
If your OS supports it, you might also be able to set HTTP_PROXY and FTP_PROXY environment variables. But I'd do it the LWP Cookbook way.