in reply to Problem while FTP

According to the documentation for Net::Cmd (which is used when you set Debug to something other than 0), it says that the output is sent to STDERR. Why not just redirect STDERR to a log file from within your script? Or you could do so on the command line.