in reply to Fringe case slice behavior
Secondly you're misrepresenting the defined behaviour of comma in scalar context. It isn't that comma acts that way, it is that lists act that way and comma normally delimits lists. Unless precedence gets in the way as in @foo = 1, 2; which is parsed (@foo = 1), $bar = 2;
Of course when you later look at +=, the same list behaviour shows up on the left hand side, resulting in the last element in the list being incremented.
The hash slice behaviour is all, of course, undefined since the order of keys is arbitrary (even more so in recent Perls).
The exact warnings that you get from various situations are, however, more likely to change from version to version.
UPDATE: Oops, ysth is (of course) correct. My bad.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Fringe case slice behavior
by ysth (Canon) on Jan 13, 2004 at 20:01 UTC | |
|
Re: Re: Fringe case slice behavior
by Anonymous Monk on Jan 14, 2004 at 04:10 UTC |