sub print_tree { my $key = shift; my $tab = shift; print "$tab$key\n"; my $array_ref = $found{$key}; if ($array_ref) { $tab .= "\t"; foreach my $element (@{$array_ref}) { print_tree($element,$tab); } } } __DATA__ output: start a c f e b d e g
In reply to Re: Recursing through hash of arrays
by LanceDeeply
in thread Recursing through hash of arrays
by Popcorn Dave
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |