Re: items in array
[email protected] ("Li, Jialin")
| Newsgroups | perl.beginners |
|---|---|
| Message-ID | <[email protected]> |
On Wed, May 14, 2008 at 4:01 PM, Tech list <[email protected]> wrote: > what is the correct way to get the number of items in an array? > > I used to use $#array > > > -- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > http://learn.perl.org/ > > > $#array is the index of the last item, so the number should be $#array + 1, or scalar @array