$ perl tim1.pl fan dango 4 4 2 1 $ cat tim1.pl #!/usr/bin/perl -w use strict; use 5.10.0; use Crypt::Random qw( makerandom ); # initialize pseudorandoms my $r = makerandom( Size => 512, Strength => 1 ); # print "$r\n"; srand($r); #populate lists my @winners = qw/stan dan/; my @winner_copy = @winners; my @correct = qw/stan dan fan dango/; my @correct_copy = @correct; #populate hash my %correct; @correct{@correct} = (); delete @correct{@winners}; print join( ' ', keys %correct ), "\n"; my $count = scalar(@correct); print "$count\n"; my @new_list = @correct; $count = scalar(@new_list); print "$count\n"; # if ( scalar(@correct) eq 0 ) my @frequency = (2, 1); # --@frequency; that didn't work print "@frequency", "\n"; # decrement frequency # does anyone with a key value of zero have a correct response yet? # if yes, you have a winner; if not then test whether there was a correct response among those with positive keys. # if no one correct among them, then there was no correct response, because that partitions the sets. $