sub printTree { my($a)=shift; my(@l); foreach $b (sort keys %{$a}) { if(ref($a->{$b}) eq 'HASH') { $l[$depth]=$b; print "@l\n"; $depth++; printTree($a->{$b}); $depth--; } else { $l[$depth]=$b; print "@l\n"; } } }
In reply to Re^2: recursive hash layer removal question
by wertert
in thread recursive hash layer removal question
by wertert
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |