in reply to error handling with Net::FTP

Net::FTP inherits from Net::Cmd, so you should be able to do something like:

$ftp->cwd('/home/costas') or die "cwd failed: [", $ftp->code, "] ", $f +tp->message;