The following code works fine for returning header information for all web
sites I run it against except for one. The one unusual web site I run this
against returns the web document but does not print out any header
information. What could explain no header information?
Thank You
****************************************************************************
*****************************
use LWP::UserAgent;
$ua = LWP::UserAgent->new;
#$ua->agent("$0/0.1 " . $ua->agent);
$ua->agent("Mozilla/8.0"); # pretend we are very capable browser
$req = HTTP::Request->new(GET => 'http://www.anycompany.com/');
$req->header('Accept' => 'text/html');
# send request
$res = $ua->request($req);
# check the outcome
if ($res->is_success) {
print $ua->request($req)->as_string;
} else {
print "Error: " . $res->status_line . "\n";
}