sub print_tree{ my ($sub, $tab) = @_; foreach (@{$found{$sub}}){ print "$tab$_\n"; $tab .= "\t"; print_tree($_, $tab); } return; }