amvarma has asked for the wisdom of the Perl Monks concerning the following question:
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Bad File descriptor Error
by Anonymous Monk on Jan 04, 2011 at 07:31 UTC | |
by amvarma (Initiate) on Jan 04, 2011 at 07:48 UTC | |
by Anonymous Monk on Jan 04, 2011 at 07:59 UTC | |
by ikegami (Patriarch) on Jan 04, 2011 at 16:43 UTC | |
|
Re: Bad File descriptor Error
by GrandFather (Saint) on Jan 04, 2011 at 07:12 UTC | |
|
Re: Bad File descriptor Error
by samarzone (Pilgrim) on Jan 04, 2011 at 08:00 UTC | |
by amvarma (Initiate) on Jan 04, 2011 at 11:17 UTC | |
by cjb (Friar) on Jan 04, 2011 at 12:56 UTC | |
by samarzone (Pilgrim) on Jan 04, 2011 at 12:42 UTC |