When I run this I am getting the following error.use File::Path; use File::Copy; use File::Basename; use Net::FTP; open(FILE, "<", "api_log_file.txt"); while(<FILE>) { chomp; push(@arr, $_); } close(FILE); chdir("C:/OzoneAPI3Regresssion/Logs"); print "Connecting to HH Device 192.168.2.35 ................ "; my $ftp=Net::FTP->new("192.168.2.35",Debug => 1,Passive => 0,Timeout=> +1000); if ( !$ftp ) { die "Cannot connect to the ftp server: $@\n"; } else { print "done\n"; } print "Passing credentials ....................... "; $ftp->login("admin","admin") or die "Could not login\n",$ftp->messag +e; print "done\n"; foreach(@arr) { print "array element: $_\n"; chomp($_); $ftp->binary; $ftp->get("$_") or die "Cannot get $_: $! $^E\n"; } print "Closing connection ........................ "; $ftp->quit; print "done\n"; ====================
Can I get some assistance? Regards AmitNet::FTP>>> Net::FTP(2.77) Net::FTP>>> Exporter(5.62) Net::FTP>>> Net::Cmd(2.29) Net::FTP>>> IO::Socket::INET(1.31) Net::FTP>>> IO::Socket(1.30_01) Net::FTP>>> IO::Handle(1.27) Net::FTP=GLOB(0x1f04884)<<< 220 FreeFloat Ftp Server (Version 1.00). Connecting to Ozone Device 192.168.2.35 ................ done Net::FTP=GLOB(0x1f04884)>>> USER admin Net::FTP=GLOB(0x1f04884)<<< 331 Password required for admin. Net::FTP=GLOB(0x1f04884)>>> PASS .... Net::FTP=GLOB(0x1f04884)<<< 230 User admin logged in. Passing credentials ....................... done array element: Access_Sequence_DotNet_Log.html Net::FTP=GLOB(0x1f04884)>>> PORT 192,168,2,31,14,49 Net::FTP=GLOB(0x1f04884)<<< 200 PORT command successful. Net::FTP=GLOB(0x1f04884)>>> RETR Access_Sequence_DotNet_Log.html Net::FTP=GLOB(0x1f04884)<<< 550 \Access_Sequence_DotNet_Log.html : can +'t find the file Cannot get Access_Sequence_DotNet_Log.html : Bad file descriptor
In reply to Bad File descriptor Error by amvarma
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |