September 2017
Beginner
402 pages
9h 52m
English
The two operators and and or are semantically equivalent to the logical && and || infix operators, but are of looser precedence.
These low-precedence operators are a perfect match for exceptional situations and false assertions, for example:
my $value = prompt('Enter a small value> ');$value < 10 or die 'Too big';say 'OK, thanks';
Here, the right-hand side of or is only executed if the assertion $value < 10 fails.