in reply to Re: Re: How do I put all sub-directories into an array?
in thread How do I put all sub-directories into an array?
=> Code is untested but should work.opendir(DIR, '/home/www/'); while (my $dir = readdir(DIR)) { print $dir; next if $dir =~ /^\.\.?$/ || ! -d $dir; push(@dirs, $dir); } closedir(DIR);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
•Re: Re: Re: Re: How do I put all sub-directories into an array?
by merlyn (Sage) on Jul 23, 2002 at 12:49 UTC | |
by kodo (Hermit) on Jul 23, 2002 at 16:59 UTC | |
|
Re: Re: Re: Re: How do I put all sub-directories into an array?
by wylie (Novice) on Jul 24, 2002 at 08:21 UTC |