For this you can use the eval function to trap fatal errors from Net::FTP functions.
For this you will want to have a read through the alarm function and the perlipc documentation.
For example:
my $retrieval = undef; my $timeout = 120; eval { local $SIG{'ALRM'} = sub { die 'timeout' }; alarm $timeout; $retrieval = $ftp->get($remote_file, $local_file); alarm 0; }; if ($@) { if ($@ =~ /timeout/) { } }
perl -le "print+unpack'N',pack'B32','00000000000000000000001010100001'"
In reply to Re: Net::FTP problems
by rob_au
in thread Net::FTP problems
by panaman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |