in reply to Recursive traversal of a HoH... and paths
The results hash could look something like this: $results{"$VAR1->{'1'}->{'1a'}"} = "element1"; Your search could push results into that hash. This is way your result and your path are both accessible via the same hash.
To navigate a HoHoH, just do the following:
foreach my $a (keys %hash) { foreach my $b (keys %{$hash{$a}}) { print "$hash{$a}{$b}\n"; } }
|
|---|