in reply to Badwords Routine

&error2(bad_words) if ($badword_found == 1);
'bad_words' is a bareword. You would have gotten a compile error if you had used use strict;. I suspect this is part of your problem. See also use strict and warnings.

Replies are listed 'Best First'.
Re^2: Badwords Routine
by htmanning (Friar) on Aug 15, 2009 at 05:40 UTC
    I figured it out:
    $bad_entered =($badword);
    Then I just pring $bad_entered. Thanks.

      Or maybe push(@bad_entered, $badword);, in case more than one bad word is found. You can then print the list of bad words (@bad_entered) in the email.