which effectively does what your callback does in a lot less typing. {grin}my $ua = LWP::UserAgent->new(max_size => 1); ... for my $url (@list_of_urls_to_check) { my $res = $ua->head($url); unless ($res->is_success) { $res = $ua->get($url); } ... }
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
In reply to •Re: LWP head replacement
by merlyn
in thread LWP head replacement
by crazyinsomniac
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |