home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.perl
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!convex!convex!tchrist
- From: Tom Christiansen <tchrist@convex.COM>
- Subject: Re: fast way to get number of elements in an assoc array?
- Originator: tchrist@pixel.convex.com
- Sender: usenet@news.eng.convex.com (news access account)
- Message-ID: <1992Aug27.152838.17427@news.eng.convex.com>
- Date: Thu, 27 Aug 1992 15:28:38 GMT
- Reply-To: tchrist@convex.COM (Tom Christiansen)
- References: <1992Aug27.032106.20515@CS.ORST.EDU> <MEISSNER.92Aug27103724@tiktok.osf.org>
- Nntp-Posting-Host: pixel.convex.com
- Organization: Convex Computer Corporation, Colorado Springs, CO
- X-Disclaimer: This message was written by a user at CONVEX Computer
- Corp. The opinions expressed are those of the user and
- not necessarily those of CONVEX.
- Lines: 19
-
- From the keyboard of meissner@osf.org (Michael Meissner):
- :In article <1992Aug27.032106.20515@CS.ORST.EDU> jacobsd@prism.cs.orst.edu (Dana Jacobsen) writes:
- :
- :|
- :| Is there a function akin to $#array that works on associative arrays?
- :
- : int (scalar (%array))
-
- Um, that doesn't tell you how many keys are in the array, just
- how full the hashtable is. You have to do something more like
-
- $count++ while each %array;
-
- --tom
- --
- Tom Christiansen tchrist@convex.com convex!tchrist
-
- char program[1]; /* Unwarranted chumminess with compiler. */
- --Henry Spencer in his regcomp.h regular expression lib
-