Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: lwp::simple basic question about webbing

by ichimunki (Priest)
on Jan 17, 2001 at 19:15 UTC ( [id://52593]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to lwp::simple basic question about webbing

In addition to following merlyn's advice about switching to a different module, I'd suggest using something like
my $a = get( $url ) || "get $url failed"; or my $a = get( $url ) or die "Couldn't get() $url: $!";
The scalar is probably better to assign a blob of text info to. With the || operator, your variable is guaranteed to at least contain something-- if not the HTML, then an error message (since if get fails, it returns undefined). With the "die" message, your program stops altogether with an informative message-- probably better unless dying is not at all an option.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://52593]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.