Hi
I have written a ftp script in perl.It seems to work fine but for some servers it throws an error "Bad file number" while trying to close the connection.What can be the reason for this?How should I resolve it? Following is the ftp section from my code:
if (!$ftp->get($ftp_FileList, $output_file_path."$ftp_FileList"))
{
$logger->error("Status: Can't Get File $ftp_FileList \n");
unlink($output_file_path.$ftp_FileList);
next;
}else
{$logger->info("Update the cache file");
print CASHE_WRITE "$ftp_FileList\n";
$logger->info("Updated the cache file");
}
$ftp->quit or die $logger->error("Couldn't quit ftp session\n"),exit;
$logger->info("---------------------------Quiting FTP----------------------------\n");
close CASHE_WRITE || $logger->error("Can't close $cacheFile opened in write mode\n");
Thanks
Debangana