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

In Perl 5.10 you could use "given": (This is a guess from the documentation; I haven't actually played with 5.10 myself)
use feature qw(say switch); given($var) { when (['yes','no']) { say "You chose $var"; } default { say "you chose something other than yes or no"; } }
  • Comment on Re: Need help testing to see if a variable is one value or the other
  • Download Code