use LWP::UserAgent; my $ua = LWP::UserAgent->new; $ua->env_proxy; my $response = $ua->get('http://example.org/'); print "HTTP response code was: ", $response->status_line, "\n"; #print "Content was:\n", $response->content, "\n"; #### HTTP response code was: 200 OK HTTP response code was: 404 Not Found HTTP response code was: 500 Can't connect to 127.0.0.1:80 (Invalid argument)