my %hash = (one => 1, two => 1, three => 1); my %keep; @keep{ qw(two three) } = (); map { exists($keep{$_}) or $hash{$_} = 0 } keys(%hash);
In reply to Re: performing operation on elements not in list?
by setebos
in thread performing operation on elements not in list?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |