Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Net::FTP

by mjolnir (Initiate)
on Dec 29, 2002 at 00:22 UTC ( #222823=note: print w/replies, xml ) Need Help??


in reply to Net::FTP

One FAQ I get a lot is how to make Net::FTP do mget/mput. I suggest the following:
foreach my $file (@files) { # Or get... $ftp->put($file) or die "Error putting $file: ", $ftp->message; }

Replies are listed 'Best First'.
Re: Re: Net::FTP
by pinetree (Scribe) on Dec 29, 2002 at 04:30 UTC
    Or, if you want to attempt to put/get all of your files - store the errors in a scalar or array and die/log them after looping through @files:
    my @errors = (); foreach my $file (@files) { # Or get... $ftp->put($file) or push (@errors, ("Error putting $file: " . $ftp +->message)); } die (join "\n", @errors);
      How do you define @files?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://222823]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (2)
As of 2021-12-08 23:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    R or B?



    Results (36 votes). Check out past polls.

    Notices?