@subdirs now has what you want.use DirHandle; my $dh = new DirHandle('/etc') or die "Can't open /etc: $!"; my @subdirs = grep { -d && $_ !~ /^\.?\.$/ } $dh->read(); $dh->close();
--
perl -e "print qq/just another perl hacker who doesn't grok japh\n/"
simeon2000|http://holdren.net/
In reply to Re: getting the names of directories under a directory
by simeon2000
in thread getting the names of directories under a directory
by DS
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |