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.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Scurbbing a string
by Anonymous Monk on Aug 25, 2007 at 09:17 UTC | |
by BrowserUk (Patriarch) on Aug 25, 2007 at 09:57 UTC | |
by BrowserUk (Patriarch) on Aug 28, 2007 at 02:33 UTC |
In Section
Seekers of Perl Wisdom