Like this perhaps
$ perl -le ' > %h = ( one => 1, two => 1, three => 1 ); > $inv = do{ local $" = q{|}; qr{^@{ [ qw{ two three } ] }$} }; > map $h{ $_ } = 0, grep ! /$inv/, keys %h; > print qq{$_ - $h{ $_ }} for keys %h;' three - 1 one - 0 two - 1 $
Cheers,
JohnGG
In reply to Re: performing operation on elements not in list?
by johngg
in thread performing operation on elements not in list?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |