Similar to wade's solution, but with multi-character comparision
if ($var=~/^(apple|pear|orange)$/) {....
In reply to Re: long if statements... What's the best way?
by nedals
in thread long if statements... What's the best way?
by cosmicperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |