shemp has asked for the wisdom of the Perl Monks concerning the following question:
Printing index -1 works fine, but trying to assign to index -1 results in the error:my @blah; print $blah[-1] . "\n"; $blah[-1] = "yes"; print $blah[-1] . "\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
•Re: array index -1 oddity
by merlyn (Sage) on Dec 06, 2002 at 18:33 UTC | |
by scain (Curate) on Dec 06, 2002 at 19:07 UTC | |
by merlyn (Sage) on Dec 06, 2002 at 20:01 UTC | |
|
(tye)Re: array index -1 oddity
by tye (Sage) on Dec 07, 2002 at 06:14 UTC | |
|
Re: array index -1 oddity
by shotgunefx (Parson) on Dec 06, 2002 at 22:08 UTC | |
by merlyn (Sage) on Dec 06, 2002 at 22:29 UTC | |
|
Re: array index -1 oddity
by Aristotle (Chancellor) on Dec 07, 2002 at 13:04 UTC |