hwg-languages archives | Aug 2000 | new search | results | previous | next |
Re: counting array elements in perlby "Marko Schilde" <webmaster(at)planetdiablo.de> |
|
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