c:\test>perl -MMath::Random::MT=rand -E"$t=time; 1 while time==$t; ++$h{ rand(10000) } while time()==$t+1; my $n=0; $_ > 1 and $n+=$_ for values %h; say $n, ' duplicates in 1 second';" 4 duplicates in 1 second c:\test>perl -MMath::Random::MT=rand -E"$t=time; 1 while time==$t; ++$h{ rand(10000) } while time()==$t+1; my $n=0; $_ > 1 and $n+=$_ for values %h; say $n, ' duplicates in 1 second';" 4 duplicates in 1 second >perl -MMath::Random::MT=rand -E" $t=time; 1 while time==$t; ++$h{ rand(10000) } while time()==$t+1; my $n=0; $_ > 1 and $n+=$_ for values %h; say $n, ' duplicates in 1 second'; " 6 duplicates in 1 second