in reply to Lotto checker...
you could count your hits easier withmy %draw = (map {$_ => 1} qw/ ... /);
In addition, as already said, use for or foreach if you want to loop an array and map if you want to create a new list. And IMHO, don't use unnecessary refs if direct arrays or hashs will do it also. It just makes the code harder to read and to maintain.... my $hits = @draw{@$bet}; ...
Greetings,
Janek
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Lotto checker...
by kcott (Archbishop) on Apr 15, 2014 at 21:04 UTC |