You can gain some time by using a search for id that stops when it finds any match instead of continuing thru the whole list.
use List::Util qw/any/; ... # if ($A+$B == 2 && grep {$_ eq $TI} @IDS){ if ($A && $B && any { $_ eq $TI } @IDS) {
Update: toolic's idea is better.
In reply to Re: Script far too slow with large files - wisdom needed!
by GotToBTru
in thread Script far too slow with large files - wisdom needed!
by biologistatsea
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |