in reply to Re: Capturing occurrence counts via tr/// with variable interpolation
in thread Capturing occurrence counts via tr/// with variable interpolation

The other idiom for getting the count from m// is
$ans = () = $str =~ m/$SrchStr/g;

Caution: Contents may have been coded under pressure.
  • Comment on Re^2: Capturing occurrence counts via tr/// with variable interpolation
  • Download Code