Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Answer: How do I find directories within directories using : parse_dir(`ls -l`)

( #109270=categorized answer: print w/ replies, xml ) Need Help??

Q&A > directories > How do I find directories within directories using : parse_dir(`ls -l`) - Answer contributed by japhy

If using parse_dir isn't a hard requirement, you can read directories using the normal, built-in means: readdir.
opendir DIR, $path or die "can't read $path: $!"; @dirs = grep -d "$path/$_", readdir DIR; closedir DIR;

Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (15)
As of 2016-06-28 21:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (363 votes). Check out past polls.