use LWP::UserAgent; $ua = LWP::UserAgent->new; $ENV{ http_proxy } ='http://localhost:80'; $ua->env_proxy; print $ua->get( 'http://www.google.com' )->as_string; #### [Sat Jun 17 17:30:57 2006] [debug] proxy_http.c(630): Content-Type: text/html