in reply to Re: logical Exclusive Or, xor
in thread logical Exclusive Or, xor
asEXPR1 and EXPR2;
if (EXPR1) {EXPR2}
And something similar for or.
I've used xor, although not very often. A few months ago I used it in a program that took command line arguments. 2 options where multiple exclusive, but at least one of them had to be used. So I had something like:
unless (defined ($opt1) xor defined ($opt2)) { die "usage message"; }
I don't use xor often, but I still use it more than CGI.pm ;-).
Abigail
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: logical Exclusive Or, xor
by Aristotle (Chancellor) on Oct 14, 2002 at 14:22 UTC |