in reply to Hash filter one-liner not working as expected
I wonder if there's a hash filter function somewhere, as in:
my $new_ref = filter_hash { $a =~ /color/ and !ref $b } $hashref;
Where $a is each key and $b is the corresponding value. Seems trivial to write, so it must exist.
UPD: Here: Hash::MostUtils - called hashgrep.
|
|---|