in reply to Re: recursive hash layer removal question
in thread recursive hash layer removal question

Thanks for the fast reply. I'm sorry I normally check for hash reference. Can't understand why I didn't here i must have recursion brain ache. Example is the printTree function removed from the original post.
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"; } } }