in reply to How to get the correct count
This is probably not doing what you expect, because the quantifier * is greedy. You might change it towhile($k=~ /[AG]TG.*T[AG][AG]/ig){$GENE++}
to see what happens. (The new code stores the matching part (using () ) to the special variable $1 and prints it). HTH, Ratawhile($k=~ /([AG]TG.*T[AG][AG])/ig){$GENE++; print "$1\n";}
|
|---|