Skip to content

Commit 1c10605

Browse files
committed
perlop: Use formal terminology to distinguish or, xor
1 parent 16e15ce commit 1c10605

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
@@ -1505,9 +1505,9 @@ X<operator, logical, xor> X<operator, logical, exclusive or> X<xor>
15051505

15061506
There is no low precedence operator for defined-OR.
15071507

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

15121512
print FH $data or die "Can't write to FH: $!";
15131513

@@ -1529,7 +1529,8 @@ takes higher precedence.
15291529

15301530
Then again, you could always use parentheses.
15311531

1532-
Binary C<"xor"> returns the exclusive-OR of the two surrounding expressions.
1532+
Binary C<"xor"> returns the logical exclusive disjunction of the two
1533+
surrounding expressions.
15331534
It cannot short-circuit (of course).
15341535

15351536

0 commit comments

Comments
 (0)