arajani has asked for the wisdom of the Perl Monks concerning the following question:

Hi All Monks,

I am ftp'ing multiple files to another system. For this I
am using Net::FTP. The code is below. I am wondering how
to capture the return value of the ftp. Success or failure.

I am interested in the return values of the following.

1. when FTP->new() call was invoked
2. when all the files were ftp'd. i.e., at FTP->quit
   Even if one of the file is not ftp'd I want to make it
   a failure. Or do I need to check the status for each of
   the file transfered?
   Further to this, is there a way to ftp all the files at
   one shot .. by using equivalent of mput ??

Is it possible? pls. let me know.
$ftp = Net::FTP->new("mysys",Port => 9021,Timeout => 20, Debug => 0); $ftp->login("anonymous",''); $ftp->put("$dir/$file1"); $ftp->put("$dir/$file2"); $ftp->put("$dir/$file3"); $ftp->quit;
Thanks in advance,


Edit kudra, 2002-05-16 Closed open PRE tag