Hello people I get a message to a server I'm uploading to with perl that I don't understand. When it's a bigger file I get this response:
$ perl upload5.pl Net::FTP>>> Net::FTP(2.77) Net::FTP>>> Exporter(5.63) Net::FTP>>> Net::Cmd(2.29) Net::FTP>>> IO::Socket::INET(1.31) Net::FTP>>> IO::Socket(1.31) Net::FTP>>> IO::Handle(1.28) Net::FTP=GLOB(0x8ec59a0)<<< 220 FTP Server ready. Net::FTP=GLOB(0x8ec59a0)>>> USER u63263303 Net::FTP=GLOB(0x8ec59a0)<<< 331 Password required for u63263303 Net::FTP=GLOB(0x8ec59a0)>>> PASS .... Net::FTP=GLOB(0x8ec59a0)<<< 230 User u63263303 logged in Net::FTP=GLOB(0x8ec59a0)>>> TYPE I Net::FTP=GLOB(0x8ec59a0)<<< 200 Type set to I Net::FTP=GLOB(0x8ec59a0)>>> CWD /vids/ Net::FTP=GLOB(0x8ec59a0)<<< 250 CWD command successful Net::FTP=GLOB(0x8ec59a0)>>> ALLO 37155952 Net::FTP=GLOB(0x8ec59a0)<<< 200 ALLO command successful Net::FTP=GLOB(0x8ec59a0)>>> PASV Net::FTP=GLOB(0x8ec59a0)<<< 227 Entering Passive Mode (50,21,179,12,19 +6,219). Net::FTP=GLOB(0x8ec59a0)>>> STOR hydrogenalternativefromfossils.avi Net::FTP=GLOB(0x8ec59a0)<<< 150 Opening BINARY mode data connection fo +r hydrogenalternativefromfossils.avi Net::FTP=GLOB(0x8ec59a0): Timeout at /usr/share/perl/5.10/Net/FTP/data +conn.pm line 74 Use of uninitialized value $@ in concatenation (.) or string at upload +5.pl line 12. put failed $
But the put didn't fail. I haven't tested on this one, but I've found that these binaries are there faithfully, so why the message?
$ cat upload5.pl #!/usr/bin/perl -w use strict; use Net::FTP; my $domain = 'www.altgreendesigns.com'; my $username = ''; my $password = ''; my $file1 = 'hydrogenalternativefromfossils.avi'; my $ftp = Net::FTP->new($domain, Debug=>1, Passive=>1) or die "Can' +t connect: $@\n"; $ftp->login($username, $password) or die "Couldn't login\n"; $ftp->binary(); $ftp->cwd('/vids/') or die "cwd failed $@\n"; $ftp->put($file1) or die "put failed $@\n"; my @list = $ftp->dir(); # print "@list \n"; $
as long as I've got your attention, what's a more "perly" way to write the commented-out print statement: # print "@list \n";the newline doesn't seem to be delimiting the output. Thanks
In reply to interpreting a server's response by Aldebaran
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |