http://www.perlmonks.org?node_id=634966


in reply to Scrubbing a string

You'll probably reject this because it uses string eval, but it is simple and effective.

$ex = 'p!u-r-*e'; $ctl = 'pure';; eval "\$ex =~ tr[$ctl][]cd;"; print $ex;; pure

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.