in reply to grep not equal

Why not use a hash instead?
my %covered; @covered{@covered_genes} = (); exists $covered{$_} || say for @all_genes;