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 :)
In reply to Re: DataStructure::RecursivelyTransform?
by BrowserUk
in thread DataStructure::RecursivelyTransform?
by bduggan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |