Sorry, wasn't clear enough in my question. What I was looking for is the function that replaces every occurence of a string in a large string with another string. In other words, just like Replace in ASP/VB, but I can only use ASP/mod_perl.
Example
I have this string: "Hello Mr.X, how are you doing Mr.X?"
and then I want to replace Mr.X with another name, Mike, so that I get: "Hello Mike, how are you doing Mike?"