2 # Search for bad words in strings
4 # Copyright (c) 2000 Dirk Koopman
17 use vars qw(%badwords $fn);
19 $fn = "$main::data/badwords";
22 # load the badwords file
27 my $fh = new IO::File $fn;
41 my $l = "can't open $fn $!";
48 # check the text against the badwords list
51 return grep { $badwords{$_} } split(/\b/, lc shift);