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

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

( #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?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (15)
As of 2015-07-29 11:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (263 votes), past polls