I have a swear filter but it's too bloody strict for my liking. It blocks the A-- word out (and all other swears by sub'ing them for **** instead. It's too picky because it makes cl**** instead of class or ****umption instead of assumption. How can I get it to block full words rather than words containing swear words?
for (grep defined($_), (keys %chat){
my ( $name, $message, $ip) = split /~~/, $chat{$_};
$message =~ s/$_/****/g for @words; # swear words are evil!