You can also use Net::FTP built-in error reporting mechanisms:
$ftp->ok(), $ftp->message(), $ftp->code(). All of those
methods refer to the status of the last $ftp call that was
made. (see
Net::Cmd for info on the ok, message, and code methods
that are common to most Net:: modules).
$ftp->some_command();
if($ftp->code()==425){
# handle a "Can't open data connection." type error
}
#etc...
The FTP error codes are detailed in
RFC 959. | [reply] [d/l] |
do you want something like this:
$ftp->command() #or whatever you're doing here
or warn "can't complete command : $!\n";
or are you asking for something else. a little code might help. | [reply] [d/l] |