Problem:
It will not advance to the next user in the list. It always dies right after it sends the 2/2 files from the first users dir.
$USERLIST="/export/home/mxdooley/perl_ftp/userlist";
$USER_DIR="/export/home/mxdooley/perl_ftp/homes";
$FTP_OUT_DIR="/export/home/mxdooley/perl_ftp/recieved";
sub ftp_out {
print "SUB USER=$uname PASS=$pass HOST=$host\n";
$ftp = Net::FTP::Recursive ->new("$host", Debug => 1) or die "HOST ERROR: ($@) ";
$ftp->login("$uname","$pass") or die "UNAME/PASS ERROR: ",$ftp->message;
$ftp->cwd("$FTP_OUT_DIR") or die "CWD ERROR: ",$ftp->message;
$ftp->rput("${USER_DIR}/${uname}/*") or die "RPUT ERROR:",$ftp->message;
#$ftp->quit;
}
open (USERLIST, $USERLIST) || die "MIKE ERROR: ($!)";
foreach (<USERLIST>) {
chomp;
push(@ULIST,$_);
}
foreach (@ULIST) {
($uname ,$pass ,$host)= split(/:/, $_);
chdir ("$USER_DIR/$uname") || die "NO GO ($!)";
ftp_out($uname ,$pass ,$host);
}
-- OUTPUT --
RPUT ERROR:ASCII data connection for test.synthium (10.40.11.28,44879).
Transfer complete.