in reply to Re: Optimizing a string processing sub
in thread Optimizing a string processing sub

I was thinking along similar lines, but using tr// in its count-them mode. $cnt1= $x =~ eval "tr/$y//";

Hmm, the tr doesn't do interpolation. So it trades the @{[ for an eval.