Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: checking return from Net::FTPSSL

by tangent (Parson)
on Oct 07, 2015 at 00:43 UTC ( [id://1143994]=note: print w/replies, xml ) Need Help??


in reply to checking return from Net::FTPSSL

I'm not sure why it is behaving differently if the file doesn't exist - can you show how you create the ftps object?

You can always check yourself that the file exists before calling put:
if ( ! -e $file ) { emailerr("$file does not exist"); } else { $ftps->put($file); }
To check if put() was successful you only need to see if the last FTP status code starts with "2", so:
my $rtncode = $ftps->last_status_code; if ( $rtncode != 2 ) { # deal with error }
Note: last_status_code() returns the first digit from the full 3 digit response code.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-03-28 16:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found