Re: How to detect if a text body contains forbidden words

[email protected] (Bo Berglund)
Newsgroups perl.beginners.cgi
Message-ID <[email protected]>
On Tue, 20 Nov 2007 19:01:08 +0100, Bo Berglund
<[email protected]> wrote:

>>
>>sub spam_reject {
>>  if ($CONFIG{'Feedback'} =~  /href=|http:/i ) #i = ignore case
>>  {
>>      # reject code goes here
>>      push(@ERROR,'*SPAM*');
>>  }
>>
>>  if (@ERROR) {
>>      &error('spam_contents', @ERROR);
>>  }
>>
>>
>>Do you think that this would work?
>>
>
>I tested it now but it did not work, I got the email out anyway....
>What did I do wrong in the syntax above?
>

Turns out that the Feedback is not in the $CONFIG array, by changing
$CONFIG to $FORM it worked!

Thanks again for pointing me in the right direction.

Bo Berglund
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.