in reply to Need help testing to see if a variable is one value or the other

Or, if GrandFather's solution is too elegant and simple, you can use a module. (It is way overkill here, though!)
use strict; use Set::Scalar; my $s = Set::Scalar->new( qw/yes no/ ); my $var = "no"; if ( $s->has($var)){ print "found $var\n"; } else{ print "never heard of $var\n"; }