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