in reply to LWP::Simple hanging (maybe?)

If you want to control timeouts, I think that LWP::Simple is just that.. too simple. If you want finer control over your "GET's", use LWP::UserAgent instead. This provides a 'timeout' method which you can use to timeout sooner.
--
Go Fish!

Replies are listed 'Best First'.
Re^2: LWP::Simple hanging (maybe?)
by derby (Abbot) on Aug 10, 2005 at 12:36 UTC
    ++ and for example

    #!/usr/bin/perl -w use strict; use LWP::UserAgent; my $agt = LWP::UserAgent->new(); $agt->timeout( 10 ); my $res = $agt->get( 'http://www.perlmonks.org' ); if( $res->is_success ) { print " ... ok\n"; } else { print " ... failed: ", $res->code, "\n"; }

    -derby