in reply to Re: How do I find the index of the last element in an array?
in thread How do I find the index of the last element in an array?
An observation:
Juerd was just arguing against this syntax here today. I don't know what he means by: "$#foo + 1 isn't necessarily equal to @foo"(Some Perl array nuance I am not familiar with) but I tend to agree with him that using the more direct syntax:
print "index of last element: $#A";
is easier to understand and you don't have to leave future maintainers of your code guessing.
Thanks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Answer: How do I find the index of the last element in an array?
by Juerd (Abbot) on Jun 02, 2003 at 06:39 UTC | |
by pzbagel (Chaplain) on Jun 02, 2003 at 15:59 UTC | |
|
Re: Re: Answer: How do I find the index of the last element in an array?
by tommyw (Hermit) on Jun 02, 2003 at 14:23 UTC | |
by edan (Curate) on Jun 02, 2003 at 14:41 UTC | |
by tommyw (Hermit) on Jun 02, 2003 at 14:50 UTC |