for( qw( foo bar baz ) ){ print "yep" and last if $test eq $_; }