Ok! I have decided to use the Net::FTP::Common module
But, when I execute my code, I get the error
error logging in: at /usr1/duser/ActivePerl-5.8/lib/site_perl/5.8.2/Net/FTP/Common.pm line 127.
Can't call method "cwd" on an undefined value at /usr1/duser/ActivePerl-5.8/lib/site_perl/5.8.2/Net/FTP/Common.pm line 276.
Is it a problem with my code or with the installation of the module? But, after installation of the module I got a message "Successfully installed Net-FTP-Common version 3.7 in ActivePerl 5.8.2.808."
Here is my code
use Net::FTP::Common;
my $common_cfg = { Host => 'ftp.servername.com',
User => 'username',
Pass => 'password',
RemoteDir => '/files'
};
my $ftp = Net::FTP::Common->new($common_cfg, Debug => 0);
$ftp->get("somefile.txt");
$ftp->quit;