This way the conditions are evaluated less times
Eh? Not so.
At best, the expanded version will result in the same number of evaluations.$ perl -le 'print "T" if (print "foo" xor print "bar")' foo bar $ perl -le 'print "T" if ((print "foo" and not print "bar") or (not pr +int "foo" and print "bar"))' foo bar foo
-sauoq "My two cents aren't worth a dime.";
In reply to Re: Re: Re: Anyone use "xor" in conditionals?
by sauoq
in thread Anyone use "xor" in conditionals?
by bsb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |