Ok, so the Texas Lotto is up to $47 million. So I decided, screw these quick pic machines, ill just write a Perl script to give you random numbers. It works great. Gonna play the numbers tonight.

[ Check it out ]

If you’re interested here’s my code:

#!/usr/bin/perl -w
use strict;

my $times = $ARGV[0] || 1;

for (1..$times) {
    my @numbers;
    for(1..5) {
        my $num = randm();
        until ("@numbers" !~ /$num/) {
            $num = randm();
        }
        push (@numbers,$num);
    }
    @numbers = sort {$a <=> $b }@numbers;
    print "@numbers ".randm()."BB\n";
}

sub randm {
    sprintf("%2.2d ",int(rand(44))+1);
}

Wog and Metlhed came up with a one liner:

sub r{sprintf"%02d",1+rand 44}while($ARGV[0]--){$_=my%n;$n{+r}++,$_="@{[sort+keys%n]}| ".r."-BB\n"until 22==y///c;print}