Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: How to catch Net::FTP timeouts ?

by steves (Curate)
on Sep 24, 2004 at 12:10 UTC ( #393469=note: print w/replies, xml ) Need Help??


in reply to How to catch Net::FTP timeouts ?

You can catch anything using eval blocks:

eval {$ftp->get("that.file")}; if ($@ =~ /Timeout/) { # catching code goes here }
Net::FTP also lets you set the timeout value, so you could try increasing it if that's the problem.

Replies are listed 'Best First'.
Re^2: How to catch Net::FTP timeouts ?
by Limbic~Region (Chancellor) on Sep 24, 2004 at 12:54 UTC
    steves,
    You can catch anything using eval blocks:

    Absolutes are seldom absolute....

    eval { exit }; print "I caught it\n" if $@;

    Cheers - L~R

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2022-01-22 13:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (62 votes). Check out past polls.

    Notices?