Hi,
Could anyone help me, what is wrong with the program below?
I need to spool the STDERR into a file in order to check it.
Here is the source, which doesn't work:
sub putftp {
$ftp = Net::FTP->new("1.2.3.4", Debug => 1);
$ftp->login("name",'passwd');
$ftp->binary();
$ftp->put($_[0],$_[1]);
$ftp->quit;
close STDERR;
open (STDERR,">>/dir1/dir2/dir3/err.log"
}
Unfortunately, the err.log file always empty.
Thanks,
kisan
Could anyone help me, what is wrong with the program below?
I need to spool the STDERR into a file in order to check it.
Here is the source, which doesn't work:
sub putftp {
$ftp = Net::FTP->new("1.2.3.4", Debug => 1);
$ftp->login("name",'passwd');
$ftp->binary();
$ftp->put($_[0],$_[1]);
$ftp->quit;
close STDERR;
open (STDERR,">>/dir1/dir2/dir3/err.log"
}
Unfortunately, the err.log file always empty.
Thanks,
kisan