in reply to checking return from Net::FTPSSL
To check if put() was successful you only need to see if the last FTP status code starts with "2", so:if ( ! -e $file ) { emailerr("$file does not exist"); } else { $ftps->put($file); }
Note: last_status_code() returns the first digit from the full 3 digit response code.my $rtncode = $ftps->last_status_code; if ( $rtncode != 2 ) { # deal with error }
|
|---|