#!/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"; }
In reply to Re^2: LWP::Simple hanging (maybe?)
by derby
in thread LWP::Simple hanging (maybe?)
by Elliott
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |