From: perl-win32-users-boun...@listserv.activestate.com [mailto:perl-win32-users-boun...@listserv.activestate.com] On Behalf Of Rothenmaier, Deane Sent: 03 May 2012 17:08 To: perl-win32-users@listserv.ActiveState.com Subject: Hash Key function puzzlement -- a point of information query
> Gurus, > > Given something like this: > > #!Perl > use strict; > use warnings; > > my %hash; keys(%hash) = 128; You have changed the number of hash buckets, not the number of keys. > > print "hash has " . scalar(keys(%hash)) . " keys\n"; > > I should see a printed value of 128, wouldn't you think? But no, it prints: > "hash has 0 keys". What's up wit > dat? What obvious thing am I missing? That's correct, because you have not added any keys. HTH -- Brian Raven Please consider the environment before printing this e-mail. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient or have received this e-mail in error, please advise the sender immediately by reply e-mail and delete this message and any attachments without retaining a copy. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden. _______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs