in reply to Re^6: 'xor' operator is not a sibling to 'or' and 'and'?
in thread 'xor' operator is not a sibling to 'or' and 'and'?

> I think that section needs to be slightly rewritten

I agree that && and || should be extended with the notion: "returns last evaluated side".

Probably with an analogous if statement.

A || B := do { if (A) {A} else {B} }

I disagree that they "do not return logical result" , because the truth table is fully respected.

I don't think the docs to and/or need to be extend, because their low precedence and use for flow control makes the use of return values unlikely without brackets. Mentioning the similarity to && and || should be sufficient.

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery FootballPerl is like chess, only without the dice