in reply to Re^2: Filtering unwanted chars from input field
in thread Filtering unwanted chars from input field
Thank you, johngg. Not sure why I complicated it. Yours is, indeed, a more elegant and readable solution (++). Was brought back to this node after the following should-have-done-this-in-the-first-place solution occurred to me:
$str =~ s/[^$acceptable]//gi;
Edited my original comment to reflect this...
|
---|
In Section
Seekers of Perl Wisdom