in reply to Need time-out procedure for HTML perl procedure

#!/usr/bin/perl use warnings; use strict; use LWP::UserAgent; use HTTP::Request::Common; my $ua = LWP::UserAgent->new; $ua->timeout(5); my $res = $ua->request(GET 'http://google.com'); if ($res->is_success) { print $res->content; }else{print 'Uh oh timeout'}

I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku

Replies are listed 'Best First'.
Re^2: Need time-out procedure for HTML perl procedure
by BioLion (Curate) on Aug 16, 2010 at 16:58 UTC

    So... not that difficult then ;)

    Just a something something...