is not really as dangerous as print $x +6 is.The latter is dangerous? Say $x is a number, and it gets interpreted as a filehandle. You get a runtime exception. OTOH, suppose you write print $x + 6, intending to print 6 to the filehandle $x -- what now happens is that it prints a large number to the default filehandle. Annoying, yes. Dangerous? Doubtful. Despite it being a heuristic, the outcome is deterministic. Any test that executes the code path this code is in will reveal this.
In reply to Re^5: Operator precedence of unary plus (Bug or Feature)
by JavaFan
in thread Operator precedence of unary plus (Bug or Feature)
by LanX
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |