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

Re: getting the names of directories under a directory

by simeon2000 (Monk)
on Aug 30, 2002 at 03:29 UTC ( [id://193982]=note: print w/replies, xml ) Need Help??


in reply to getting the names of directories under a directory

I just love DirHandle, myself.

use DirHandle; my $dh = new DirHandle('/etc') or die "Can't open /etc: $!"; my @subdirs = grep { -d && $_ !~ /^\.?\.$/ } $dh->read(); $dh->close();
@subdirs now has what you want.

--
perl -e "print qq/just another perl hacker who doesn't grok japh\n/"
simeon2000|http://holdren.net/

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (2)
As of 2024-04-26 03:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found