in reply to Net::Ftp Issue
Hi there,
You say that this code
$ftp->get("Report_$date.csv") or die "Cannot retreive file: $!\n", $ft +p->message;
gives this error message:
Cannot retreive file: Bad file descriptor
As you see, $ftp->message is actually empty, which may indicate that the issue is not with the FTP server, but with something locally. Please post how you create the $ftp object and what FTP commands you issue prior to issuing the get FTP command.
To see what commands Net::FTP sends to the ftp server, you can pass Debug => 1 to Net::FTP->new(). Also consier calling $ftp->get() with 2 arguments, specifying full path to where the file should be stored locally as the second argument. There might be some issues with permissions.
Good luck.
|
---|
In Section
Seekers of Perl Wisdom