Wait, I screwed up that last email. The uniques is the number of hash keys.
At 10:53 AM 12/1/2005 -0500, Ted Schuerzinger wrote:
>> for (1 .. 10000) {
>> my $fn = rand();
>> ++$dup and next if exists $num{$fn};
>> $num{$fn} = 1;
>> }
>> print scalar keys %num, " unique numbers. $dup duplicates produced\n";
>>
>
>Just for fun, I changed one of the lines in that to
>
>for (1 .. 1000000) {
>
>When I ran the modified script, I got 32768 unique numbers, with 967232
>duplicates! As 32768 is a power of 2, I'm wondering if there's a limit on
>the number of keys one may have in a hash.
--
REMEMBER THE WORLD TRADE CENTER ---=< WTC 911 >=--
"...ne cede malis"
00000100
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs