Hi,
I do have warning, strict all that turned on, but someone here don't like to see in the error logs the use of unnitialized errors on it, this sub checks the input from a form like this, simply:
You can probably clean up your cleanup code a little like this:
use strict;
use warnings;
my $str = "<some> text with';*()/? nasty chars. scripted should be ok,
+ but not script";
print cleanup($str);
sub cleanup
{
$_[0]=~tr|<>;()"'?/*||d;
$_[0]=~s/\bscript\b//g;
return $_[0];
}