LanX has asked for the wisdom of the Perl Monks concerning the following question:
DB<130> $q=1 DB<131> print $q + 4*5 21 DB<132> print $q +4*5 # what ??? DB<133> use warnings; print $q +4*5 print() on unopened filehandle 1 at (eval 67)[/usr/share/perl/5.10/per +l5db.pl:638] line 2. ... DB<134> use warnings; print $q+4*5 21 DB<135> use warnings; print $q+ 4*5 21
Is there any parsing rule which makes the second expression act like as if $q was meant to be a filehandle?
Bug or feature?
Cheers Rolf
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Operator precedence of unary plus (Bug or Feature)
by ikegami (Patriarch) on Feb 04, 2012 at 23:57 UTC | |
by ikegami (Patriarch) on Feb 05, 2012 at 00:04 UTC | |
|
Re: Operator precedence of unary plus (Bug or Feature)
by JavaFan (Canon) on Feb 05, 2012 at 10:32 UTC | |
by LanX (Saint) on Feb 05, 2012 at 12:17 UTC | |
by JavaFan (Canon) on Feb 05, 2012 at 17:50 UTC | |
by LanX (Saint) on Feb 05, 2012 at 18:22 UTC | |
by JavaFan (Canon) on Feb 05, 2012 at 20:29 UTC | |
by JavaFan (Canon) on Feb 05, 2012 at 20:22 UTC | |
|
Re: Operator precedence of unary plus (Bug or Feature)
by Khen1950fx (Canon) on Feb 05, 2012 at 04:42 UTC |