Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
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 scrutinizing the Monastery: (13)
As of 2014-07-30 16:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (237 votes), past polls