in reply to Re^4: How to find all occurrences of a key in a deeply nested structure?
in thread How to find all occurrences of a key in a deeply nested structure?

Ok, like this
print join ' ', UniqueWalkers( $struct ); sub UniqueWalkers { my %found; Data::Walk::walk( sub { if (/^values$/) { foreach ( keys %{ $Data::Walk::container->{$_} } ) { $found{$_}++; } } return; }, @_ ); return sort keys %found; }
  • Comment on Re^5: How to find all occurrences of a key in a deeply nested structure?
  • Download Code