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