Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re^5: Net::FTP::Recursive code not downloading files

by tangent (Vicar)
on Dec 14, 2013 at 12:15 UTC ( #1067131=note: print w/replies, xml ) Need Help??

in reply to Re^4: Net::FTP::Recursive code not downloading files
in thread Net::FTP::Recursive code not downloading files

Why would I need to run the code for each directory separately? Isn't that the whole point of recursion, so it will drill down into each directory until there are no more levels?
MatchDirs is not doing what you think - it is not saying "if a directory matches this pattern go in and recurse". What it is saying is "for every directory do not enter unless its name matches this pattern". Changing the pattern will not help as it tests against the directory name not the path.

Peeking into the Module's relevant code may help:

elsif ( $file->is_directory() ) { if( ( $options{MatchDirs} and $filename !~ $options{MatchDirs} ) or ( $options{OmitDirs} and $filename =~ $options{OmitDirs} )){ next FILE; }

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1067131]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2018-05-27 04:15 GMT
Find Nodes?
    Voting Booth?