in reply to multipal NE scalar

This is the reverse of a question in perlfaq4, namely, How can I tell whether a list or array contains a certain element?.

For example, you might say:

my %unmatches = ( 1 => 1, 2 => 1, 3 => 1, 4 => 1 ); unless (exists $unmatches{$sum} ) { print "didn't match!\n"; }