chomp @lines; foreach (@lines) { next unless /^>/; push @chromoLine, $_ if (split /\|/)[4] =~ /\Q$Homosapiens\E/; }