Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re: Precedence (spot the bug)

by Arguile (Hermit)
on Oct 22, 2001 at 05:16 UTC ( #120424=note: print w/replies, xml ) Need Help??

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 ;).

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://120424]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2016-10-25 00:30 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (313 votes). Check out past polls.