#!/usr/bin/perl use Regexp::Common qw /profanity/; # http://staff.dstc.edu.au/bill/carlin.html @dirty7 = qw|Shit Piss Fuck Cunt Cocksucker Motherfucker Tits|; foreach (@dirty7) { print; /$RE{profanity}/ and print " contains profanity"; print "\n"; }