Logical XOR
Logical XOR
Posted Jun 11, 2024 22:58 UTC (Tue) by MarcB (guest, #101804)In reply to: Logical XOR by pbonzini
Parent article: perl v5.40.0 released
It is not really the logical XOR that is new. Perl already had this, named "xor". But "xor" is a low-precedence operator, like "and" or "or" (vs. "&&" or "||"). The high-precedence version of "xor" was missing before, which was an inconsistency.
That is all this change is about. Now all logical operator exist in three versions: bit-wise, high-precedence logical and low-precedence logical.
See https://perldoc.perl.org/perlop#Operator-Precedence-and-A...