G'day fishy,
Applying this advice from Arunbear and bigj:
my %draw = map { $_ => 1 } qw( ... ); my @bets = ( ... );
You can reduce your original code, which is somewhat difficult to read and maintain, to just this:
print for map { my $hits = grep { $draw{$_} } @$_; "@$_ --> $hits" . ($hits > 2 && ' *') } @bets;
My test code and results are in the spoiler:
-- Ken
In reply to Re: Lotto checker...
by kcott
in thread Lotto checker...
by fishy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |