in reply to Need help testing to see if a variable is one value or the other
Alternately (heh) use a regex.
if( $var =~ m/\A ( yes | no ) \z/x ) { print "you chose $1\n"; } else { print "BAD USER, NO DONUT!\n"; }
The cake is a lie.
The cake is a lie.
The cake is a lie.
In Section
Seekers of Perl Wisdom