I would have thought that trying to assign to the -1 element in an uninitialized array would assign to element 0, but i guess not.I would call that unexpected.
Assigning to element -1 assigns to the highest element in the array. You have an empty array. There is no "highest element". That's out of range.
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
In reply to •Re: array index -1 oddity
by merlyn
in thread array index -1 oddity
by shemp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |