Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

•Re: LWP head replacement

by merlyn (Sage)
on Nov 03, 2003 at 12:02 UTC ( [id://304097]=note: print w/replies, xml ) Need Help??


in reply to LWP head replacement

It also suffices in recent LWP releases to simply say:
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); } ... }
which effectively does what your callback does in a lot less typing. {grin}

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://304097]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2024-04-21 20:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found