in reply to Re: Failed to create a file
in thread Failed to create a file

Having stubbed my toe on this many times, I have made it my habit to use action or die instead of action || die.
An alternative reaction is to always use parens on function calls: some_function(ARGS) || die. The advantage of this strategy is that it improves readability, plus now you don’t have to memorize a bunch of confusing and conflicting precedence rules.

Replies are listed 'Best First'.
Re^3: Failed to create a file
by moritz (Cardinal) on May 09, 2011 at 12:58 UTC
    I'm curious, which precedence rules are "conflicting"?

    Also I find the rule "logical operators that are spelled out as words have loose precedence" not too hard to remember.

      That doesn’t tell you enough. It’s lower than a comma operator, which makes it unusable in data declarations. I simply gave up on it, and went back to using parens the way God and Dennis intended. Now I never make mistakes. Must safer, and easier to read, too.