in reply to array of MySQL data for substitution
There are a bunch of solutions if you search CPAN, and they have all kinds of features like storing the rude words in ROT-13 so that you see "shpx" instead of "fuck", plus using soundalike detection so that more creative miscreants can't get away with "phuk" either.
($_='kkvvttuubbooppuuiiffssqqffssmmiibbddllffss')
=~y~b-v~a-z~s; print
|
|---|