Quick question:
Is there a shorter way to write this line:
($var eq 'foo' || $var eq 'bar')without having to enter $var twice other than using a regexp?
($var =~ /^(?:foo|bar)$/)Thanks!
In reply to var comparison by nemesisgus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |