in reply to
Count multiple pattern matches
Have you tried to insert a
study $string;
outside the loop, before you do the first regex match? This should speed up the matches, especially if
$string
is very long.
perldoc -f study
[download]
for more information.
Comment on
Re: Count multiple pattern matches
Download
Code
In Section
Seekers of Perl Wisdom