I know that it this is not hard to write by myself, but in order to avoid reinventing the wheel: Does someone know a CPAN utility module, which has a function to create a subset of a hash, so that the newly created hash contains only those keys of the original hash which match a certain regexp? Kind of
my %new_hash=(); grep { $_ =~ $my_regexp && $new_hash{$_}=$original_hash($_) } keys %original_hash;
In reply to grep for hash? by rovf
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |