Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

•Re: LWP head replacement

by merlyn (Sage)
on Nov 03, 2003 at 12:02 UTC ( #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? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2022-01-20 19:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (57 votes). Check out past polls.

    Notices?