Matthew Fischer wrote:

> What is the best way to find the number of occurences of a specific character in a 
>string?

Here is OMWTDI, "matching" instead of "replacing":
             $_ = "abc" x 10;
     while (m,a,g) {  $x++  };
             print "Letter 'a' was found $x times";
And seamingly it is not slow.


Detlef

Reply via email to