in reply to What protects me from doing this stupid thing..?
perldoc perlop Operator Precedence Associativity
The || operator has a higher precedence than the comma, so your code should work as you intend. What do you mean by, it doesn't work?
As I read it, that should assign the param "some_var" to the value of supplied by the hash or 10 if that is false.
- Miller
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: What protects me from doing this stupid thing..?
by Cody Pendant (Prior) on Aug 12, 2007 at 02:19 UTC | |
by syphilis (Archbishop) on Aug 12, 2007 at 03:04 UTC | |
by dogz007 (Scribe) on Aug 12, 2007 at 18:12 UTC |