Ok, thanks again for all your help. I just want to make sure this looks right.
*********************************
my %ftpServers = { "A" => 0,
"B" => 0,
"C" => 0 };
sub loginFailed {
my $error = shift;
my $ftpFailed = shift...
ok, I am starting to see how this works. but I see that in this code
my $ftpa = Net::FTP->new("[removed]", Debug => 0) or die "Cannot connect to ftp server A: $@";
#repeat for your other ftp servers
if the ftp server was down and it couldn't connect, would the script be dead or would it move...
would this be the same in this section of code
$ftpa->login('[removed]','[removed]') or die "Cannot login to FTP server A.", $ftpa->message;
$ftpb->login('[removed]','[removed]') or die "Cannot login to FTP server B.", $ftpb->message;
$ftpc->login('[removed]','[removed]') or die "Cannot login...
I am trying to send certain files to 3 different ftp servers. I have it working but the issue is, is when one fo the requests fail, they all fail. I would like to set it up so that if one of the servers fails, it still sends the files to the other two ftp servers.
This is the part of the code...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.