A very useful Perl coding example. How to filter swear words.
This is a very useful Perl code sample, this will filter out any bad words that are entered into the array. 1 2 3 4 5 6 7 8 9 10 11 12 my @forbidden = ("very","bad","words","go","in","this","array"); foreach my $forbidden (@forbidden) { # If a naughty word is typed… if ($comments =~ /$forbidden/) { … Read more