my $useragent = LWP::UserAgent->new; $useragent->timeout(10); my $response = $useragent ->get($url); if ($response->is_success && $response->status_line() eq "100") { print $response->decoded_content; } else { die $response->status_line; }