perfectly_dark
09-23-2003, 05:49 PM
Hi,
I'm by no stretch a perl programmer, but I do know programming in other languages so please bare with me ;)
I wrote a Perl script a few days ago that takes a file and FTPs in to a web site. It worked on one computer but now I tried it on another computer and it doesn't work anymore. Heres the code:
#!/usr/bin/perl
#
use strict;
use warnings;
use Net::FTP;
my $ftp = Net::FTP->new("website.com", Debug => 3);
$ftp->login("username", "password");
$ftp->cwd("/htdocs");
$ftp->put("/etc/rc.d/file.file", "file.file");
$ftp->quit;
The address, username, password are all replaced by their proper values. The problem is that when I run this, I get an error message:
"Can't call method "login" on an undefined value at ./rc.ftpscript2 line 8"
Does anyone know what's wrong with this script or the system? Do I need to install some modules or something?
Thx in advance
I'm by no stretch a perl programmer, but I do know programming in other languages so please bare with me ;)
I wrote a Perl script a few days ago that takes a file and FTPs in to a web site. It worked on one computer but now I tried it on another computer and it doesn't work anymore. Heres the code:
#!/usr/bin/perl
#
use strict;
use warnings;
use Net::FTP;
my $ftp = Net::FTP->new("website.com", Debug => 3);
$ftp->login("username", "password");
$ftp->cwd("/htdocs");
$ftp->put("/etc/rc.d/file.file", "file.file");
$ftp->quit;
The address, username, password are all replaced by their proper values. The problem is that when I run this, I get an error message:
"Can't call method "login" on an undefined value at ./rc.ftpscript2 line 8"
Does anyone know what's wrong with this script or the system? Do I need to install some modules or something?
Thx in advance