in reply to Returning N values from a Regexp

How about you store the return value of the regexp in an array list context and use the length of that array the returned list as $numMatches?

CU
Robartes-

Update: clarified a bit.