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