Keep It Simple, Stupid | |
PerlMonks |
Net::FTP problemsby panaman (Acolyte) |
on Dec 29, 2003 at 11:40 UTC ( [id://317408]=perlquestion: print w/replies, xml ) | Need Help?? |
panaman has asked for the wisdom of the Perl Monks concerning the following question:
Hello Monks,
I am writing a seismology remote seismograph station event data
retrieval program. Big and long but trivial really. I use
net::ftp. My problem is that occasionally one of the FTP's to one of
the stations the transfer hangs up. (Lousy connections here in Panama)
I get one of two results. One is that program just sits there and the
other is that the net::ftp module times out sends a time out error
message and tosses me out to the operating system. Both outcomes are
lousy.
I need to recover from a failed FTP transfer in an orderly way.
for instance:
$test = $ftp->get($remote_file,$local_file);
Works fine if the transfer was ok or if the transfer was damaged. In
one case it return the name of the file retrieved and in the other
returns false.
If the transfer hangs nothing happens and if it times out in one of
the net::ftp pm's it tosses me out into the OS.
Am I using Net::FTP wrong?
Is there a way to trap the Net::FTP error message before find myself
in the operating system so that I can act on it.
Is there a way to make my own timeout function?
Any other suggestions?
I have read the Net::ftp docs and understand them the best I can.
>
Happy New year,
Angel Rodriguez, headline@volcanbaru.com
Back to
Seekers of Perl Wisdom
|
|