for (my $i = 0 ; $i/) { $current_subject = $line[$i]; chomp ($current_subject); push (@filtered_subjects, $current_subject); } } my @element; #### >gi|14670349|ref|NM_032999.1| Homo sapiens general transcription factor II, i (GTF2I), transcript >gi|2827179|gb|AF035737.1|AF035737 Homo sapiens general transcription factor 2-I (GTF2I) mRNA, complete >gi|19908489|gb|AF343351.1| Mus musculus TFII-I repeat domain-containing protein 3 beta 7 mRNA, #### foreach my $z (@filtered_subjects) { chomp $z; @element = split('\|', $z); if($element[4] =~ /\Q$Homosapiens\E/) { push(@chromoLine, $z); } } } #### if($element[4] =~ /\Q$Homosapiens$choromosome\E/)