in reply to Re^3: "open" Best Practices
in thread "open" Best Practices
I agree with everything you've said, and use the operators in the same way myself, with very few exceptions (for example, I might sometimes write if (not ...) instead of unless(...) if it reads better). Consistency is definitely a good thing!
I was just disagreeing with the "never" part - TIMTOWTDI, and function() || ... is valid Perl and sometimes applicable. In the context of the root node, I explicitly included that form because a newcomer might have seen it in other code, and I think it's good to say that it's not wrong, but also not recommended. Anyway, I've edited the root node further to highlight that even more.
(What do you think about if( open($fh, '<', $foo) || open($fh, '<', $bar) )? ;-) )
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: "open" Best Practices
by hippo (Archbishop) on Jul 13, 2019 at 10:25 UTC | |
|
Re^5: "open" Best Practices
by Anonymous Monk on Jul 13, 2019 at 22:04 UTC |