open BADWORDS, "badwords.db" or die $!; $found = 0; for my $word () { chomp $word; $word = quotemeta($word); $found = 1 if $message =~ /$word/; }