Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use strict;
    ...
    my @num = (0 .. 54);
    my @freq;
    ++$freq[int(rand(55))] for 1 .. 10_000;
    
  2. or download this
    {
        my $temp  = $freq[$i];      # swap frequencies
    ...
        $num[$i]  = $num[$j];
        $num[$j]  = $temp;
    }