M
mnagaraj
This is the code producing the error:
<---------------snip----------->
use strict;
use warnings;
use Net::FTP;
my $firm_user = 'string1';
my $firm_pass = "string2";
my $firm_dir = "string3";
my $outfile = "string4";
#Open a socks FTP connection
my $ftp = Net::FTP->new('socks');
$ftp->login($firm_user, $firm_pass)
or die print("ERROR! Unable to connect to the FTP server: ",
$ftp->message);
$ftp->ascii();
$ftp->cwd($firm_dir)
or die print("ERROR! Unable to 'cd' to $firm_dir directory: ",
$ftp->message);
$ftp->put($outfile)
or die print("ERROR! Unable to ftp the file at this time: ",
$ftp->message);
$ftp->quit;
<--------end snip-------->
I tried, ls, pwd, etc and all these work. I tried the FTP from the
shell and it works just fine. Any clues as to what might cause this
error.
BTW this program did work in the past. I am clueless as to the source
of the error!
Thanks,
-mouli.
<---------------snip----------->
use strict;
use warnings;
use Net::FTP;
my $firm_user = 'string1';
my $firm_pass = "string2";
my $firm_dir = "string3";
my $outfile = "string4";
#Open a socks FTP connection
my $ftp = Net::FTP->new('socks');
$ftp->login($firm_user, $firm_pass)
or die print("ERROR! Unable to connect to the FTP server: ",
$ftp->message);
$ftp->ascii();
$ftp->cwd($firm_dir)
or die print("ERROR! Unable to 'cd' to $firm_dir directory: ",
$ftp->message);
$ftp->put($outfile)
or die print("ERROR! Unable to ftp the file at this time: ",
$ftp->message);
$ftp->quit;
<--------end snip-------->
I tried, ls, pwd, etc and all these work. I tried the FTP from the
shell and it works just fine. Any clues as to what might cause this
error.
BTW this program did work in the past. I am clueless as to the source
of the error!
Thanks,
-mouli.