in reply to Comparing against multiple values
PrimeLord's hash suggestion is quite good. I'd suggest also maybe a for loop as something more traditional:
or all on one line:for( qw( foo bar baz ) ){ print "yep" and last if $test eq $_; }
if it'll be a more complex action down the line, you can "do":print "yep" and last if $test eq $_ for( qw( foo bar baz ) );
do { print "yep"; last; } if $test eq $_ for( qw( foo bar baz ) );
In Section
Seekers of Perl Wisdom