in reply to DataStructure::RecursivelyTransform?
Take a look at Data::Rmap. Something like this should do the trick.
use Data::Rmap qw[ rmap_hash ]; rmap_hash{ for my $key ( keys %{ $_ } ) { next unless $key eq 'Target key value'; $_->{ $key } =~ $someRegex; } } $refToArbitraryStructure;
Whether that is an easier than what you have is your decision. More efficient? Benchmark it :)
|
---|