Acme-Wabby
view release on metacpan or search on metacpan
# Split the phrase into component words. We're splitting on simple
# whitespace here.
my @words = split /\s+/, $phrase;
# First we're going to loop through the words and clean them up a bit.
# While we're at it, we're going to find the index of the last real
# word in this phrase.
foreach my $word (@words) {
# Clean up the word a little bit. We allow hyphens and
# apostrophies to occur within words, but not at the beginning
# or ends of words.
$word =~ s/^\s+//;
$word =~ s/\s+$//;
$word =~ s/^-+//g;
$word =~ s/^'+//g;
$word =~ s/-+$//g;
$word =~ s/'+$//g;
# Only allow the single-character words of 'a' and 'I'.
# FIXME - Need to be able to configure this so that persons with
( run in 1.182 second using v1.01-cache-2.11-cpan-ceb78f64989 )