- Run it in debug mode
- Print the status of FTP statements that fail (and the error messages are not in "$!"; you have to read both the Net::FTP and Net::Cmd docs).
On connect the error message is in "$@", for Net::Cmd (which a Net::FTP object is a subclass of), I forget, its some method.