Hello,

What I want to is to load a file "$bw" 
and then have my regrex find if any of the bad words are in any of the form fields. 
The code I have here does not work.

# $in{$i} are the form fields, that need to be checked for 
# any of the bad words, contained in the bad_words.txt

$bw ='../class/bad_words.txt';

## read a list of bad words

open(BW,$bw) || die &dead("Can't find Bad word list", $!);
@indata = <BW>; 
close(BW); 

$tmp = join ("|", @indata);
## need to cycle through them
### Does not work 

foreach $i (keys %in) {

if  ( $in{$i} =~ /$tmp/ig) {

print <<badwords;
<html><body>  
<h2>Request denied-improper language.</h2>
@indata
<br>
$tmp
</body></html>  
badwords
exit(0);

 
    }

}

Thanks,
Dave

*====================================================*
*   Cora Connection Your West African Music Source   *  
*   http://www.coraconnection.com/                   *  
*   Resources, Recordings, Instruments & More!       *
*====================================================*

Reply via email to