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 :)


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.