RE: [Perl-unix-users] List of directories in a directory

2002-09-30 Thread Arnold, Craig
Hi Kobby, The first is fairly straightforward: @files = grep -d, <$your_filespec> ; The second requires a module: use File::Path ; rmtree $your_dir ; hth, Craig Arnold -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, Sept

Re: [Perl-unix-users] List of directories in a directory

2002-09-26 Thread $Bill Luebkert
[EMAIL PROTECTED] wrote: > How do I get a list of directories within a directory into an array ? Untested: opendir DIR, $dir or die "opendir $dir: $!"; my @dirs = grep { -d && ! /^\.{1,2}$/ } readdir DIR; closedir DIR; > Can I remove directories containing files in perl ? use File::Path; rmtre