Somewhat OT; in general, I find it easier to specify which characters to allow, rather than trying to anticipate what might be used against me.
print cleanup(q/!s@#cr%ipt^&script?M:r;"._ \'W\\][iz][{}=a=+-r-d`~\''/ +); sub cleanup { my $string = shift; if ( defined $string ){ $string =~ s/[^\p{Alnum}., ]//g; $string =~ s/script//g; } return $string; }
In reply to Re: Return Question in Subroutine
by thundergnat
in thread Return Question in Subroutine
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |