in reply to Bad Language In Contact Messages

Hmm... I hate when I type something, and the website discards my message, because it thinks that I used some kind of bad language. I can think of a few situations. Also, you should maybe remove spaces from the text, because I could still play the program and get past with some bad words by inserting spaces between the letters. However, if your program uses tr to get rid of everything except letters, then the words will flow together, and you will falsely reject some letters which seem like they contain bad words but they don't. For example 'helloworld' starts with the word 'hell' so you should check if that bad word is maybe part of another word. Also, "Holy" in itself is not a bad word. But if you use it together with "Holy sh*t" then it is. Okay, so you only look for the S word. Great. But if they write "weaver's hitch" and remove everything except letters, then you got the bad word. So, it's really easy to get flagged, and it's hard to catch only the bad stuff. Like I said, I hate when some websites prevent me from posting. Facebook does this a lot. They have some sort of filter. I press "Send" and my message simply disappears. There are combination of words they dislike probably, but I haven't been able to figure it out yet.

#!/usr/bin/perl use strict; use warnings; my @BADWORDS = ('hell'); $a = ' H e l l o w o r l d ! '; $a =~ tr|a-zA-Z||cd; $a = lc($a); print $a;