Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Re: How control Net::FTP transfer

by RhetTbull (Curate)
on Apr 16, 2001 at 23:19 UTC ( [id://72905]=note: print w/replies, xml ) Need Help??


in reply to Re: How control Net::FTP transfer
in thread How control Net::FTP transfer

I had a similar problem. When you create a Net::FTP object you can set a Timeout value. If the connection times out, you can trap the error and try to get the file again or re-login and start all over.

I put the Net::FTP->get() call in an eval block so I could look at $@. If $@ contains something like "Timeout at ... FTP.pm' then I start all over again.

I had special reasons for doing that (I needed to know if the server timed out or if there was some other error) but you could probably just do something like birdbrane does in his reply to my node. Net::FTP->get will return an error if it does not succeed.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-04-19 03:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found