Tom Christiansen (lists.p5p): >Witness: > >% repeat 20 perl -le '@n = sort { rand() <=> rand() } 1 .. 20; print "@n"' >17 5 4 7 1 14 12 3 11 9 20 13 8 6 16 19 15 18 2 10 >17 5 4 7 1 14 12 3 11 9 20 13 8 6 16 19 15 18 2 10 > >Now, that isn't particularly random. Hm.... > >That's with 5.005_54 on OpenBSD. >Ideas? Linux, glibc 2.1: (repeat 1000 /tmp/perl5.005_03/perl -le '@n = sort { rand() <=> rand() } 1..20; print "@n"') | sort | uniq | wc -l 1000 (repeat 1000 /tmp/perl5.005_61/perl -le '@n = sort { rand() <=> rand() } 1..20; print "@n"') | sort | uniq | wc -l 1000 -- Solipsists of the World... you are already united. -- Kayvan Sylvan -- The Second Law of Thermodynamics: If you think things are in a mess now, just wait!Thread Previous | Thread Next