I *think* I get it...
What you're saying is that I could as well do this
foreach $leaf (glob("$startdir/*")) {
if (-d $leaf) {
$trash = GetDirs($leaf);
push(@dirs,$leaf);
}
}
because it would still recurse, and it really doesn't matter what I'm assigning the return of the recursion (like $trash) because I'm pushing every $leaf to @dirs right after anyway? What really matters is the return of the 1st call and not the $trash.
Or was that totally off track?
BTW: You're explanations are always fun to read... Thanx!