clash has asked for the wisdom of the Perl Monks concerning the following question: ⭐ (arrays)
One way I know of is:
This counts 'backward' from the end of the array.$array[-1]
Any others?
Originally posted as a Categorized Question.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: How do I get the last element of an array?⭐
by extremely (Priest) on Dec 03, 2000 at 11:49 UTC | |
Re: How do I get the last element of an array?⭐
by eg (Friar) on Dec 03, 2000 at 15:29 UTC | |
Re: How do I get the last element of an array?
by InfiniteSilence (Curate) on Dec 11, 2000 at 21:54 UTC | |
by Anonymous Monk on Dec 12, 2000 at 01:09 UTC | |
by Anonymous Monk on Dec 12, 2000 at 01:22 UTC | |
Re: How do I get the last element of an array?
by Anonymous Monk on Dec 04, 2000 at 02:22 UTC |
Back to
Seekers of Perl Wisdom