Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

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

by toolic (Bishop)
on Aug 15, 2009 at 17:50 UTC ( #788916=categorized answer: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use File::Listing qw(parse_dir);
    
    my @dirs = map { my( $name, $type ) = @$_; $type eq 'd' ? $name : () }
    + parse_dir(`ls -l`);
    
  2. or download this
    my @dirs = map { my( $name, $type ) = @$_; $type eq 'd' ? $name : () }
    + parse_dir(`ls -la`);
    

Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
[marto]: good morning all

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (8)
As of 2017-11-22 10:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (317 votes). Check out past polls.

    Notices?