in reply to get() from website hangs
If the problem is a slow server then just tell LWP::Simple to tell LWP::UserAgent to timeout - (no need to alarm() yourself):
use LWP::Simple qw($ua get); # export the underlying LWP::UserAgent in +to $ua ... $ua->timeout(10); # ... and set a timeout on it (seconds) my $doc = get('...') || die {$pass=0};
bw, bliako
|
|---|