in reply to How do I put all sub-directories into an array?
I guess that's what you wanted right? If you don't want the absolute path just do push(@DIRS, $_) if -d $_ instead.use File::Find; my @DIR; my $dir = '/home/www/'; find( \&wanted , $dir); sub wanted { push(@DIRS, $File::Find::dir."/".$_) if -d $_; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: How do I put all sub-directories into an array?
by wylie (Novice) on Jul 23, 2002 at 10:44 UTC | |
by kodo (Hermit) on Jul 23, 2002 at 10:56 UTC | |
by merlyn (Sage) on Jul 23, 2002 at 12:49 UTC | |
by kodo (Hermit) on Jul 23, 2002 at 16:59 UTC | |
by wylie (Novice) on Jul 24, 2002 at 08:21 UTC | |
|
Re^2: How do I put all sub-directories into an array?
by Aristotle (Chancellor) on Jul 23, 2002 at 13:52 UTC | |
by wylie (Novice) on Jul 24, 2002 at 08:23 UTC |