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; }
In reply to Re^2: How to I check if a value is present in an array?
by Tux
in thread How to I check if a value is present in an array?
by rocketperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |