in reply to array index -1 oddity

You could write that like so...
$blah[++$#blah] = 'New element';

You should rarely if NEVER play with $[
Most code assumes $[ is 0 so your likely to get some very subtle bugs.

-Lee

"To be civilized is to deny one's nature."

Replies are listed 'Best First'.
•Re: Re: array index -1 oddity
by merlyn (Sage) on Dec 06, 2002 at 22:29 UTC