use split on the ">gb|" delimeter ."|" is a special char so escape and use lengthmy $x=">gb|AE004895>gb|TTGGT>gb|"; my @gene= split(/>gb\|/,$x); foreach my $tmp (@gene) { if($tmp =~ m/\w+/) { print "Length"."=".length($tmp)."\n"; } }
In reply to Re: parsing question
by chimni
in thread parsing question
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |