http://www.perlmonks.org?node_id=120424


in reply to Precedence (spot the bug)

You might consider using the lower precedence "or" especially for error checking. The double pipe version is more useful for when you want to do short-circuit evaluation in conditional expressions.

opendir DIR, '/' or die "Failure opening dir /: $!";

Stylistically I find this much easier to read and you don't have to worry about precedence as 'or' and 'xor' are as low as you can get on the chart ;).