
Parentheses and operators (is it me or is it the world?)
| Ah yes, the ++/= anomaly. Here's a simpler form of it:
| $x = 0; (++ $x) = 5; # sets $x to 5.
| $x = 0; ++ ($x = 5); # sets $x to 6.
| $x = 0; ++ $x = 5; # sets $x to 1!
|
| The last line should act like the first line, but the evaluator ends
| up assigning 5 to a useless location.
I too believe that the last line should act like the first line, and
be illegal, to parallel C's interpretation.
The result of a ++ or -- is not an lvalue.
for ("Juss","anotheq","Perk","hackeq") { print ++$_, " "; } print "\b,";
--
/=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\
| on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III |
\=Cute Quote: "Intel: putting the 'backward' in 'backward compatible'..."====/