perl -wle 'my( $A, $B ); print for map "[$_]", ( $A xor $B ), ( $A and not $B or $B and not $A ); '