in reply to grep not equal

If you really want to use ne, you have to check that the number of different elements equals the number of all the elements:
for my $gene (@all_genes) { say $gene if @covered_genes == grep $_ ne $gene, @covered_genes; }

A benchmark shows your way, as inefficient as it might be, is about 15% faster.

لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ