Re: counting array elements in perl
by "Marko Schilde" <webmaster(at)planetdiablo.de>
|
| Date: |
Thu, 24 Aug 2000 13:11:18 -0700 |
| To: |
"christopher l. filkins" <design(at)chronotope.com>, <hwg-languages(at)hwg.org> |
| References: |
chronotope |
| |
todo: View
Thread,
Original
|
|
Simply use the Array in scalar context.
$elements = @array;
Or explicitly:
$elements = scalar (@array);
-M
----- Original Message -----
From: christopher l. filkins <design(at)chronotope.com>
To: <hwg-languages(at)hwg.org>
Sent: Thursday, August 24, 2000 11:02 AM
Subject: counting array elements in perl
> I can't seem to find a function which will deliver a count of the number
of
> elements in an array @array in perl.
>
> I have always assumed such a function exists. Does anyone know if it
does?
> or another solution?
>
> TIA
>
> Christopher
>
HWG: hwg-languages mailing list archives,
maintained by Webmasters @ IWA
This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.