Ok listen im trying to fin all the direcotries that
are in a folder, I mean everyone. But for some reason
this only prints out the first folder and not the sub
folders.
<code>
my @alldir = finddir("$config{home}$user{site_id}");
print $_, "\n" for @alldir;
sub finddir {
my $root = shift;
chomp $root;
$root = $root . '/' unless ( $root =~ m|/$| );
local *DIR;
opendir DIR, $root or die $!;
my @userfiles = sort grep !/^\.\.?\z/, readdir DIR;
my @direct;
foreach my $file (@userfiles) {
next unless ( -d "$root$file" );
finddir("$root$file");
my $dir = "$root$file";
$dir =~ s/^\Q$config{home}$user{site_id}\E//;
push(@direct, $dir);
}
return @direct;
}
</code>
-Andrew
__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]