in reply to Recursion and Such
Because those subroutines are named, they're defined once, and what they use for $max_depth et al is a matter of some consternation for me. I haven't played with that sort of deep magic, myself, so I can't give you a definite diagnosis, but I think your troubles are in that area.(Even though as I think about it, it seems like it should be ok.)
Try defining the subs like
and passing those variables (which are subroutine references) to find. Note that you'll need to define the subroutines before the call to find.my $wanted = sub { ...
|
|---|