Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Iterate trough a series of folders

by Marshall (Canon)
on Apr 04, 2016 at 18:13 UTC ( [id://1159533]=note: print w/replies, xml ) Need Help??


in reply to Iterate trough a series of folders

readdir will return the directories without complete path. the "." and ".." are also returned just like if you did ls or dir under windows. "." is current dir, and ".." is previous directory. You need to filter those out. grep {!/^./ and -d $_}readdir; if you have "hidden directories that start with "." and you want them, then modify grep accordingly.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (7)
As of 2024-04-18 17:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found