> -----Original Message----- > From: drieux [mailto:[EMAIL PROTECTED]] > Sent: Sunday, May 19, 2002 11:47 AM > To: cgi > Subject: Re: Counting the elements of an array > > ... > ok, so my OCD is benchmarking - but I would like to offer > what I think may be a bit quicker - if speed is your Need... > > #------------------------ > # > sub haveMap { > my (@list) = @_; > my %seen = (); > > map {$seen{$_}++} @list;
So, is the old saw about "don't use map() in a void context" out the window? > > \%seen ; > > } # end of haveMap -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]