in reply to Re^2: Net::FTP not catching errors, my fault?
in thread [solved] Net::FTP not catching errors, my fault?

Dumb question ... what's your logwarn returning? If it returns a true value you continue on to the next condition ...
if ( change current dir OR log error ) AND ... if ( 0 OR 1 ) AND ... if( 1 ) AND ...

Personally, I would wrap the code up in an eval:

eval { $ftp->login($data->{'login'}, $data->{'pw'}) or die($ftp->message); $ftp->binary or die($ftp->message); $ftp->cwd($data->{'remote_dir'}) or die($ftp->message); $ftp->put($to_upload) or die($ftp->message); $ftp->quit; }; if( $@ ) { $log->error("upload_file: xqe $data->{'id'}, " . $@); return undef; } else { return 1; }
-derby