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
Use the first function from List::Util which comes as standard with Perl....
use List::Util qw/first/;
my @a = qw(foo bar baz);
if ( first { $_ eq 'bar' } @a ) { say "Found bar!" }
NB. first returns the first element it finds and so doesn't have to iterate through the complete list (which is what grep will do).