Good solutions have been provided. The following includes randomly selecting a new winner:
map{$winners_hash{$_}++}@winners; @new_winners = grep{!$winners_hash{$_}}@correct; $the_winner = $new_winners[int(rand($#new_winners+1))];
Unless you're using an old version of perl, rand automatically calls srand.
Hope this helps!
In reply to Re: removing a sublist
by Kenosis
in thread removing a sublist
by Aldebaran
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |