my @matches = ($seq{$key} =~ /$string/ig);
#print "@matches\n";
$result{$string} = scalar(@matches);
to $result{$string} =()= ($seq{$key} =~ /$string/ig);
would hit the spec of this request, but I would also expect the speed-up achieved would be negligible. The compound of two = operators with an empty list (()) puts the regex in list context, thus obtaining a count of all matches.
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.
|