$hash_length = scalar keys %hash;

John

-----Original Message-----
From: George S Pereira [mailto:[EMAIL PROTECTED]]
Sent: 24 September 2001 10:26
To: [EMAIL PROTECTED]
Subject: How many elements are there in a hash?



Hi,
I've got a number of elements that are specified in a hash.

I need to find out the number of elements in the hash.

Is there any quick way, like $#array for arrays.

I can always move through the keys and increment a counter, but I'm
looking for a shortcut.

thanks.
George P.


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
George Pereira
CMIE
11, Apple Heritage,
54-C, Andheri-Kurla Rd.,
Andheri (E), Bombay 400093
Tel: 8219595
Fax: 8219696
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--------------------------Confidentiality--------------------------.
This E-mail is confidential.  It should not be read, copied, disclosed or
used by any person other than the intended recipient.  Unauthorised use,
disclosure or copying by whatever medium is strictly prohibited and may be
unlawful.  If you have received this E-mail in error please contact the
sender immediately and delete the E-mail from your system.



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to