in reply to Net::FTP Question.

I'll assume the password variable above is a typo, and that you do Use strict and warnings. Instead of die'ing, you can simply retry the whole process if it does not succeed (reconnect, login, put).

You can also include the reason for any failure in any warning messages ($@ on connect, $ftp->message() on any other method) if desired.