Syntactic Confectionery Delight | |
PerlMonks |
(jjhorner)Finding the total number of elements in an array.by jjhorner (Hermit) |
on Jul 19, 2000 at 16:15 UTC ( [id://23167]=note: print w/replies, xml ) | Need Help?? |
You can get the index of the last element of the array by:
Which can be used like this:
And getting the total number of elements is as easy as:
J. J. Horner Linux, Perl, Apache, Stronghold, Unix jhorner@knoxlug.org http://www.knoxlug.org/
In Section
Seekers of Perl Wisdom
|
|