This link has the coding for how to replace regular text for
CODE
<img>
tags which will display the smilies. On my site I've used it, and modified it so it also detects certain words and replaces them with ****Basically read her article and then insert variations on stuff like this instead (or as well as) the smilie code...
CODE
$str =~ s/rudeword/notsorudeword/g;
You can replace the 'rudeword' and 'notsorudeword' with anything you want, but if like me you want to replace 'notsorudeword' with stars like so ***** you'll have to omit them, this means putting a / in front of the character like this...
CODE
$str =~ s/rudeword/\*\*\*\*/g;
Hope this is what you are looking for