Any idea on why the $tab variable isn't resetting itself when the recursion starts coming back up it's chain?Yeah, you're messing with $tab in the caller, not the callee. Stop that! Don't append to the value of $tab - simply pass a different value:
print_tree($_, "\t$tab");
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
In reply to •Re: Re: •Re: Recursing through hash of arrays
by merlyn
in thread Recursing through hash of arrays
by Popcorn Dave
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |