I can't get my script to ftp.
I have a feeling it is network/socket/protocol stuff. ( I don't know much about communciations, as is apparent.)
Can anyone help?
Here's the code.
--------------------------------------------
#!/usr/sbin/perl -w
use Net::FTP;
$host = "123.45.678.912";
$user = "name";
$pass = "passwdname";
$home = "/home/httpd/htdocs";
$file = "newindex.html";
$ftp = Net::FTP->new("hpsab8"
;
die "Could not connect: $!" unless $ftp;
$ftp->login($user, $pass);
$ftp->cwd($home);
$ftp->get($file);
$ftp->quit;
------------------------------
Here's the error message:
Use of uninitialized value at /usr/share/lib/Perl5/Net/FTP.pm line 1039
Use of uninitialized value at /usr/share/lib/Perl5/Net/Cmd.pm line 307
Argument "" isn't numeric in ne at /usr/share/lib/perl5/Net/FTP.pm line 1024
Could not connect: Bad file number at myftp.pl line 14
-----------------------------------------
Thanks for any and all help.
Kyle
I have a feeling it is network/socket/protocol stuff. ( I don't know much about communciations, as is apparent.)
Can anyone help?
Here's the code.
--------------------------------------------
#!/usr/sbin/perl -w
use Net::FTP;
$host = "123.45.678.912";
$user = "name";
$pass = "passwdname";
$home = "/home/httpd/htdocs";
$file = "newindex.html";
$ftp = Net::FTP->new("hpsab8"
die "Could not connect: $!" unless $ftp;
$ftp->login($user, $pass);
$ftp->cwd($home);
$ftp->get($file);
$ftp->quit;
------------------------------
Here's the error message:
Use of uninitialized value at /usr/share/lib/Perl5/Net/FTP.pm line 1039
Use of uninitialized value at /usr/share/lib/Perl5/Net/Cmd.pm line 307
Argument "" isn't numeric in ne at /usr/share/lib/perl5/Net/FTP.pm line 1024
Could not connect: Bad file number at myftp.pl line 14
-----------------------------------------
Thanks for any and all help.
Kyle