The reason it only prints out one directory is that you are not pushing the results of your recursive calls to finddir into the @direct array.
next unless ( -d "$root$file" ); $dir = "$root$file"; $dir =~ s/^\Q$config{home}$user{site_id}\E//; push(@direct, $dir); push(@direct, finddir("$root$file"));
In reply to Re: Re: Re: Find and Print Directory Names
by ehdonhon
in thread s and replace
by andrew
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |