Skip to content

Commit 51b0e93

Browse files
committed
perlop: Use formal terminology to distinguish or, xor
1 parent 29ff1c9 commit 51b0e93

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

pod/perlop.pod

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1497,9 +1497,9 @@ X<operator, logical, xor> X<operator, logical, exclusive or> X<xor>
14971497

14981498
There is no low precedence operator for defined-OR.
14991499

1500-
Binary C<"or"> returns the logical disjunction of the two surrounding
1501-
expressions. It's equivalent to C<||> except for the very low precedence.
1502-
This makes it useful for control flow:
1500+
Binary C<"or"> returns the logical inclusive disjunction of the two
1501+
surrounding expressions. It's equivalent to C<||> except for it having
1502+
very low precedence. This makes it useful for control flow:
15031503

15041504
print FH $data or die "Can't write to FH: $!";
15051505

@@ -1521,7 +1521,8 @@ takes higher precedence.
15211521

15221522
Then again, you could always use parentheses.
15231523

1524-
Binary C<"xor"> returns the exclusive-OR of the two surrounding expressions.
1524+
Binary C<"xor"> returns the logical exclusive disjunction of the two
1525+
surrounding expressions.
15251526
It cannot short-circuit (of course).
15261527

15271528

0 commit comments

Comments
 (0)