Sadmachine has asked for the wisdom of the Perl Monks concerning the following question:
I need to scan all directories and their subdirectories so that I can build up an array of directory names.
I've used File::Find to get an array of directory names for my root directory.
sub test { use File::Find; &find(\&wanted, 'E:/Common/Intranet/'); } sub wanted { if($File::Find::name !~ m/\./) { $dirlist[$count] = $File::Find::name; } $count++; }
I don't know how to get it to work recursively though.
Any help greatly appreciated.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: recursively scanning directories
by Beatnik (Parson) on Jun 19, 2001 at 12:12 UTC | |
|
Re: recursively scanning directories
by grinder (Bishop) on Jun 19, 2001 at 12:30 UTC | |
|
Re: recursively scanning directories
by stefan k (Curate) on Jun 19, 2001 at 12:36 UTC | |
|
Re: recursively scanning directories
by sierrathedog04 (Hermit) on Jun 19, 2001 at 13:56 UTC | |
by Beatnik (Parson) on Jun 19, 2001 at 14:01 UTC |