|
|
| Perl Monk, Perl Meditation | |
| PerlMonks |
Re: Answer: How do I find the index of the last element in an array?by jens (Pilgrim) |
| on Oct 14, 2002 at 04:30 UTC ( #204971=note: print w/ replies, xml ) | Need Help?? |
|
Hmm....actually, that doesn't really help at all! This will, of course, output "3". You can also refer to the value of the last element of the array using negative indices, e.g. $letterList[-1] will also refer to "d". -- Microsoft delendum est.
In Section
The Monastery Gates
|
|
||||||||||||||||||||