in reply to parsing question
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"; } }
|
|---|