package Acme::Flanders; use 5.006; use strict; use warnings; require Exporter; our @ISA = qw(Exporter); our @EXPORT = qw( repent ); our $VERSION = '0.01'; our %NED_FILTER = ( 's**t' => 'son of a gun', 'p**s' => 'diddly on', 'f**k' => 'son of a gun', 'c**t' => 'diddly on', 'c********r' => 'son of a gun', 'm****rf****r' => 'diddly on', 't**s' => 'son of a gun', ); sub repent { my( $dirt ) = shift; my( $key ); foreach $key ( keys %NED_FILTER ) { $dirt =~ s/\b$key\b/$Acme::Flanders::NED_FILTER{$key}/ig; } $dirt; } 1; __END__ =head1 NAME Acme::Flanders - For I bad potty mouths. =head1 SYNOPSIS use Acme::Flanders; print repent("Holy S**t! Batman"); =head1 DESCRIPTION Be a good child like your parents told you and stop using potty words. This module will filter a string and replace the seven dirty words as documented by George Carlin with acceptable cursing as espoused by Ned Flanders. =head1 AUTHOR derby =head1 COPYRIGHT This module is free software. It may be used, redistributed and/or modified under the terms of the Perl Artistic License (see http://www.perl.com/perl/misc/Artistic.html)