Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Accepted Data Connection "error" using put method of Net::FTP

by kschwab (Vicar)
on Sep 02, 2013 at 04:15 UTC ( [id://1051882]=note: print w/replies, xml ) Need Help??


in reply to Accepted Data Connection "error" using put method of Net::FTP

It appears that $ftp->put is supposed to return the remote filename created. Being a little pedantic, it seems the right thing to test for would be if the return value is defined. Suppose you "put" a file named '0'. Your current test would fail. Try defined($ftp->put($file)) or die(); Also print out the value of $! in your die statement, it might be helpful.

Looking quickly at the source for Net::FTP, another thing you might try is using $ftp->put_unique instead of $ftp->put. It flows through some different logic where the return value is set a bit differently. Same goes for calling $ftp->binary before doing the put. Slightly different logic that could affect the return value.
  • Comment on Re: Accepted Data Connection "error" using put method of Net::FTP

Replies are listed 'Best First'.
Re^2: Accepted Data Connection "error" using put method of Net::FTP
by Only1KW (Sexton) on Sep 02, 2013 at 20:20 UTC
    I added the binary call and tried uploading the same file again. It worked this time. I'll see if it continues to work over time. Thanks!

Log In?
Username:
Password:

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

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

    No recent polls found