Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!caen!spool.mu.edu!uunet!convex!usenet From: tchrist@convex.COM (Tom Christiansen) Newsgroups: comp.lang.perl Subject: Re: A question on associative arrays Message-ID: <1991Jun04.043204.22374@convex.com> Date: 4 Jun 91 04:32:04 GMT Article-I.D.: convex.1991Jun04.043204.22374 References: <1991May30.205555.14490@convex.com> <1991Jun3.230111.8818@NCoast.ORG> Sender: usenet@convex.com (news access account) Reply-To: tchrist@convex.COM (Tom Christiansen) Organization: CONVEX Software Development, Richardson, TX Lines: 21 Nntp-Posting-Host: pixel.convex.com From the keyboard of allbery@ncoast.ORG (Brandon S. Allbery KF8NH): :As quoted from <1991May30.205555.14490@convex.com> by Tom Christiansen : :+--------------- :| if (%a) { :| :| will actually work, but I don't think that Larry has ever documented :| this. More portably, and more slowly would be :+--------------- : :Not in so many words he hasn't, but %a has an array value, and therefore has a :scalar value (the number of elements in the array generated by %a in an array :context). Note that %a will be *twice* the number of entries in the assoc :array, since it is a list of keys *and* values. Um, no, I don't think that's what's afoot: see Larry's article I reposted on what you get from a scalar %a reference. --tom -- Tom Christiansen tchrist@convex.com convex!tchrist "Perl is to sed as C is to assembly language." -me