in reply to One out of three ain't bad
if($x && !$y && !$z or !$x && ($y xor $z)) { print "Exactly one variable set\n"; } [download]