I'm doing a little mod of DBMan to check for unacceptable words. What I have so far is
if (lc($in{$col}) =~ /$dirty_word/) {
push(@input_err, "$col (Includes a banned word.");
}
}
As soon as it comes up with one unacceptable word, there's no point in checking for more. How do I exit the loop early?
Thanks much!
------------------
JPD
Quote:
foreach $dirty_word (@dirty_words) { if (lc($in{$col}) =~ /$dirty_word/) {
push(@input_err, "$col (Includes a banned word.");
}
}
As soon as it comes up with one unacceptable word, there's no point in checking for more. How do I exit the loop early?
Thanks much!
------------------
JPD