Note that conditional will always be true if $t2 will be true, because '||' operator is lower in precedence than 'ne' (precedence list -- perlcheat). I guess OP asks maybe for 'shorter' (faster to write/maintain) way than $name ne $t1 || $name ne $t2.if ($name ne $t1 || $t2) { do something }
In reply to Re: Comparing multiple strings
by rsFalse
in thread Comparing multiple strings
by bigup401
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |