There's always the "evil" string eval:
my ( $s1, $s2 ) = ( 'pure', 'pppp!u-r-*e' ); my $re = eval "qr/[^$s1]/"; $s2 =~ s/$re//g; print $s2; # ppppure
In reply to Re: Scurbbing a string
by FunkyMonk
in thread Scrubbing a string
by princepawn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |