perldoc -q count
See also: How do I compose an effective node title?use warnings; use strict; my $substring = 'GATC'; my $count = 0; my $sequence = 'GAGAGACCCCGATCGAGAGACCCGATCFGAGAVCTGATCCCC'; while ($sequence =~ /$substring/g) { $count++ } print "count = $count\n"; __END__ count = 3
In reply to Re: stupid/simple mistake
by toolic
in thread stupid/simple mistake
by gogoglou
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |