Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

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


Comment on Re: Precedence (spot the bug)
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (11)
As of 2014-08-28 11:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (259 votes), past polls