Sorry, confusing myself since I have several versions. Here is the script i'm trying to get working.
#!/usr/bin/perl
use Net::FTP;
use File::Listing qw(parse_dir);
$host = 'ServerName';
#$path = 'DestinationPath';
$ftp = Net::FTP->new($host, Timeout => 1800) or die "Cannot contact $host: $!";
$ftp->login('ID', 'PWD') or die "Cannot login ($host):" . $ftp->message;
#$ftp->cwd($path) or die "Cannot change directory ($host):" . $ftp->message;
#Files = `dir *.txt`;
#$ftp->binary();
#$ftp->ascii();
@Files= `ls -lR`;
foreach $file (parse_dir($Files))
{
my($name, $type, $size, $mtime, $mode) = @$file;
$ftp->put($name) or warn "Could not put $name: ".$ftp->message();
}
$ftp->quit;
exit;