in reply to Messing Around
Update: I f'd it up with rand and put a 53 where a 54 should be. Thanks to ikegami for catching that.my @numbers; $numbers[ int(rand(54)) + 1 ]++ for 1 .. 10_000; print join ', ', ( map { "$_ ".($numbers[$_]||'0') } reverse sort { $n +umbers[ $a ] <=> $numbers[ $b ] } (1 .. 54) )[0..5];
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Messing Around
by atcroft (Abbot) on Feb 22, 2005 at 23:35 UTC | |
|
Re^2: Messing Around
by ikegami (Patriarch) on Feb 22, 2005 at 23:17 UTC | |
by phaylon (Curate) on Feb 22, 2005 at 23:40 UTC |