Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Net :: FTP

by aitap (Deacon)
on Sep 04, 2012 at 18:53 UTC ( #991679=note: print w/ replies, xml ) Need Help??


in reply to Net :: FTP

First, set up a list of directories.

$f->cwd($dir) or die "Can't cwd to $dir\n";
Next, instead of dieing in case of inability to CWD, switch to the next list element in a foreach loop.

For example:

my @directories = qw/code test/; foreach my $dir (@directories) { $f->cwd("/home/$dir") || next ... # your code to fetch the files }

Sorry if my advice was wrong.


Comment on Re: Net :: FTP
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (15)
As of 2014-07-29 16:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (220 votes), past polls