I am uploading files from local to FTP using perl Net::FTP Module. After uploading the file, how can I get the status in a scalar variable that the file has been uploaded successfully or not? I am using the code that mentioned below.
use strict;
use Net::FTP;
my $ftp_connection=Net::Ftp->new('debian1.com');
$ftp_connection->login("myuser","password");
$ftp_connection->put('D:/to_upload/tested.xml','/root/received/tested.xml');
$ftp_connection->quit;
Please provide your valuable suggestions to implement the above task.
Is it possible to transfer the file as binary mode?
Note: I am developing this in Windows OS.
Thanks…
$ftp_connection->put('D:/to_upload/tested.xml','/root/received/tested.xml');code returns file name that is
/root/received/tested.xmlon success else it will return undefand for binary mode before
putmethod add$ftp_connection->binary();hope below code will help you with your needs