What Leo said. keys(%hash) returns the keys from the hash as an array, you can't assign to it AFAIK.
On Thu, May 3, 2012 at 10:18 AM, Leo Susanto <leosusa...@gmail.com> wrote: > keys is a function, it doesn't take in value > > On Thu, May 3, 2012 at 9:08 AM, Rothenmaier, Deane > <deane.rothenma...@walgreens.com> wrote: >> Gurus, >> >> >> >> Given something like this: >> >> >> >> #!Perl >> >> use strict; >> >> use warnings; >> >> >> >> my %hash; keys(%hash) = 128; >> >> >> >> 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? >> >> >> >> Thanks, >> >> >> >> Deane Rothenmaier >> >> Programmer/Analyst – IT-StdCfg >> >> Walgreens Corp. >> >> 2 Overlook Point #N51022D >> >> MS 6515 >> >> Lincolnshire, IL 60069 >> >> 224-542-5150 >> >> >> >> The more corrupt the republic, the more numerous the laws. -- Tacitus >> >> >> >> >> _______________________________________________ >> Perl-Win32-Users mailing list >> Perl-Win32-Users@listserv.ActiveState.com >> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs >> > _______________________________________________ > Perl-Win32-Users mailing list > Perl-Win32-Users@listserv.ActiveState.com > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs _______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs