|
|
| "be consistent" | |
| PerlMonks |
Re^5: counting the number of 16384 pattern matches in a large DNA sequenceby kennethk (Monsignor) |
| on Jun 14, 2012 at 17:56 UTC ( #976268=note: print w/ replies, xml ) | Need Help?? |
|
I would expect swapping 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.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||