use feature qw(say switch); given($var) { when (['yes','no']) { say "You chose $var"; } default { say "you chose something other than yes or no"; } }
In reply to Re: Need help testing to see if a variable is one value or the other
by jozxyqk
in thread Need help testing to see if a variable is one value or the other
by paulehr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |