in reply to Script errors: connecting to ftp server. Help me Debug please

What steps have you taken to reduce the amount of code?

Where in the code does the error happen? Does the error still happen if you remove all the code after the problematic line?

Usually, Perl tells you a line number when it terminates a program. What is the number?

There is the mention of a variable $ftp, but it never gets initialized. There is no mention at all of a method call ->login anywhere in your script.

Are you certain that you actually run this script? It uses wget instead of using Net::FTP.