( grep { $var eq $_ } qw( foo bar ) ), but I would probably stick to your first example. This is close to the point where I would refactor out the comparison into a sub named with a description of what I was trying to check.
--MidLifeXis
In reply to Re: var comparison
by MidLifeXis
in thread var comparison
by nemesisgus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |