in reply to Re: Net::FTP server errors?
in thread Net::FTP server errors?

++lestrrat for the correct answer.

In case you're wondering GhodMode, the trick is that the Net::FTP module has a 'ISA' relationship with Net::Cmd which means that in addition to the methods listed on the Net::FTP man page, you can also use the methods listed in the Net::Cmd man page.

If you're checking whether a specific error occurred, you should use the $ftp->code() method which returns the three digit error code - this should be consistent for RFC compliant FTP servers whereas the text message may change. But if you just want to print out a diagnostic message when something goes wrong then $ftp->message() is what you want.