Friday, March 5, 2010

How to find multiple matches of same string in perl

This is one way:

$count += () = $teststring =~ /(test)/g;