Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
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`) 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;

Comment on Answer: How do I find directories within directories using : parse_dir(`ls -l`)
Select or Download Code
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 scrutinizing the Monastery: (11)
As of 2014-08-29 09:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (277 votes), past polls