http://www.perlmonks.org?node_id=1047702


in reply to Re: How to I check if a value is present in an array?
in thread How to I check if a value is present in an array?

If @gl is (or can be) large/huge, List::Util's first can be an important speedup.

use List::Util qw( first ); for my $current (@genes) { say $current if first { $_ eq $current } @gl; }

Enjoy, Have FUN! H.Merijn