my @winners = ( "ruth", "sheila" ); my @correct = ( "ruth", "martin", "dee", "zack" ); # Build lookup table of winners my %in_winners = map { $_ => 1 } @winners; # Find items that are in @correct but not in @winners my @correct_only = grep { not $in_winners{$_} } @correct;