Quantcast
Channel: perl – Securitron Linux blog.
Viewing all articles
Browse latest Browse all 7

A very useful Perl coding example. How to filter swear words.

$
0
0
This is a very useful Perl code sample, this will filter out any bad words that are entered into the array. my @forbidden = ("very","bad","words","go","in","this","array"); foreach my $forbidden (@forbidden) { # If a naughty word is typed... if ($comments =~ /$forbidden/) { goodbye2(); # Send the naughty cur to somewhere else. exit; # Kill the […]

Viewing all articles
Browse latest Browse all 7

Trending Articles