TStanley has asked for the wisdom of the Perl Monks concerning the following question:
connecting to 128.1.198.22... Connected to 128.1.198.22 port 21 220 Service ready USER mvpadmin 331 User name ok, need password PASS (hidden) 230 User logged in PWD 257 "/" Host type (I): UNIX (standard) PORT 128,1,208,162,19,38 200 Command OK LIST 150 Here it comes... Received 52 bytes in 1.0 secs, (51.90 Bps), transfer succeeded 226 Transfer Ok, Closing connectionNow I know that the last two lines are what is being displayed to my FTP program from the remote directory on the VoIP equipment. How would I deal with the line "150 Here it comes..."? my current test script receives the following error: "getsockname() on closed socket GEN0 at D:/Perl/lib/IO/Socket.pm line 192"
#!perl -w use strict; use Net::FTP; my $user="mvpadmin"; my $pass="mypassword"; my $opb="D:\\MVP\\OutPhBk.tmr"; my $mvp="128.1.198.22"; my $FTP=Net::FTP->new($mvp,Timeout=>20); my $login=$FTP->login($user,$pass); if(!defined $login){ die"Unable to connect: $!\n"; }else{ print"Connected to $mvp\n"; } $FTP->binary; $FTP->put($opb); $FTP->close;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: FTP automation
by derby (Abbot) on Jun 27, 2003 at 18:00 UTC | |
by dataDrone (Acolyte) on Jun 27, 2003 at 21:38 UTC | |
by TStanley (Canon) on Jun 30, 2003 at 13:49 UTC | |
by derby (Abbot) on Jun 30, 2003 at 15:14 UTC | |
by TStanley (Canon) on Jul 01, 2003 at 16:21 UTC | |
by derby (Abbot) on Jul 01, 2003 at 18:52 UTC |