my %small_hash; my @keys_to_keep = grep $config->{$_},@interesting_keys; @small_hash{@keys_to_keep} = @$config{@keys_to_keep}; return \%small_hash;
In reply to Re: Taking a subset of a hash
by choroba
in thread [Answered!] Taking a subset of a hash
by Narveson
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |