sub validate_mail { my $self = shift; $self->{hackattempt} = "false"; my @entries = @_; foreach my $i (@entries) { #Catch comment spam/injection attempts!!! #Here is the filter you can modify -- if ($i =~ /(\.\.)|[\\]+|[\<\>]+|[\{\}]+|[\(\)]+|[\|]+|[\[]+|[\]]+/gi) { $self->{hackattempt} = "true1"; $self->{hackpattern} = $i; return $self->{hackattempt}; last; } #Remove any hi-jack attempts!!! if ($i =~ /BCC/gi) { $self->{hackattempt} = "true2"; $self->{hackpattern} = $i; return $self->{hackattempt}; last; } next; } return $self->{hackattempt}; }