I have a list of possible values:
@a = qw(foo bar baz);
How do I check in a concise way that a value $val is present or absent
$val
Interesting solution, especially for repeated searching:
my %hash; map { $hash{$_}++ } @a; print $hash{$val};