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";}
In reply to Re: How to get the correct count
by Ratazong
in thread How to get the correct count
by supriyoch_2008
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |