At 12:03 14/06/01 +0100, you wrote:
>Is there an easy way to get the number of
>elements in a hash? With a normal array I can just do $#myarray - but it
>doesn't work for associative arrays.
I've forgotten most of my Perl, but how about something like
"scalar(keys(%myhash))";
There's probably a better way to do this, but it works for me.
Steven.
--
email: [EMAIL PROTECTED]
web: http://www.murdomedia.net/
PGP/GnuPG keys: http://www.murdomedia.net/keys.html
--------------------------------------------------------------------
http://www.lug.org.uk http://www.linuxportal.co.uk
http://www.linuxjob.co.uk http://www.linuxshop.co.uk
--------------------------------------------------------------------