in reply to getting the names of directories under a directory

The file test operator -d works by default on $_ so you can simply grep the glob result before storing in an array.
my @names = grep -d, glob("c:/mainDir/*"); #or even my @names = grep -d, <c:/mainDir/*>;
   larryk                                          
perl -le "s,,reverse killer,e,y,rifle,lycra,,print"

Replies are listed 'Best First'.
Re: Re: getting the names of directories under a directory
by DS (Acolyte) on Aug 29, 2002 at 21:46 UTC
    thanks :)