#!/usr/bin/perl use LWP::UserAgent ; use HTTP::Request ; my $URL = 'https://10.204.16.17:16316/ibm/console/login.do?action=secure'; my $agent = LWP::UserAgent->new(env_proxy => 1,keep_alive => 1, timeout => 30); my $header = HTTP::Request->new(GET => $URL); my $request = HTTP::Request->new('GET', $URL, $header); my $response = $agent->request($request); # Check the outcome of the response if ($response->is_success){ print "URL:$URL\nHeaders:\n"; print $response->headers_as_string; print "\nContent:\n"; print $response->as_string; }elsif ($response->is_error){ print "Error:$URL\n"; print $response->error_as_HTML; }