in reply to Array slice out of order
If you change it to
you'll have two rvalues, and they will have been evaluated from left to right, yielding the 'aa' that you want.print @m[$i+0, $i++];
It doesn't have to work this way — as others point out, it's undefined behavior when side-effects happen — but this is how it is happening here.
|
|---|