You never learned how to add numbers without using your fingers? ;-)while ($sequence =~ /$substring/g) { $count++ }
I don't understand the urge to count one-by-one -- and you're not the first poster in this thread to do so.
ought to do it.while (<FILE>) { $count += () = /$substring/g; }
In reply to Re^2: stupid/simple mistake
by JavaFan
in thread stupid/simple mistake
by gogoglou
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |