in reply to grep not equal
for my $gene (@all_genes) { say $gene if @covered_genes == grep $_ ne $gene, @covered_genes; } [download]
A benchmark shows your way, as inefficient as it might be, is about 15% faster.