in reply to Need help testing to see if a variable is one value or the other
use feature qw(say switch); given($var) { when (['yes','no']) { say "You chose $var"; } default { say "you chose something other than yes or no"; } } [download]