The script seems to run fine but the files are not transferred over to the remote server. It's suppose to do a ls -l then grab the files, parse and ftp. thanks
#!/usr/bin/perl
use Net::FTP;
use File::Listing qw(parse_dir);
$host = 'hostname';
#$path = 'path/';
$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->get ($name) or warn "Could not get $name, skipped: $!";
}
$ftp->quit;
exit;