in reply to Recursion and Such

I'm going to go out on a limb and suspect that it's because File::Find uses globals that are not being reset correctly between iterations.

Being right, does not endow the right to be rude; politeness costs nothing.
Being unknowing, is not the same as being stupid.
Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.

Replies are listed 'Best First'.
Re^2: Recursion and Such
by Grundle (Scribe) on Jan 31, 2005 at 18:13 UTC
    That doesn't make sense since the line of code that is being affected is the following
    sub recursion{ findDir($dir, $min, $max); } sub findDir{ my ($dir, $min_depth, $max_depth) = @_; }
    granted that is a scaled down version, but for brevity's sake you get the idea. No matter what is being passed after $min and $max == 2 is not being updated in the findDir directory. It seems like the array @_ is holding on to old values, but even when I use
    $dir = shift; $max = shift; $min = shift; etc ...
    I still get the wrong data. This has to be some property of recursion that I am missing...