sub ruhroh {
@_ = map {
my @words = split(/\s/);
foreach my $word (@words) {
$word =~ s/^([aeiou])/r$1/ and next;
$word =~ s/^([AEIOU])/'R' . lc($1)/e and next;
$word =~ s/^[a-z][^aeiou]?/r/ and next;
$word =~ s/^[A-Z][^aeiou]?/R/;
}
join(' ', @words);
} @_;
push @_, ', Raggy!';
goto &croak;
}
####
ruhroh("And I'd have gotten away with it, too, if it weren't for you meddling kids");
####
Rand Ri'd rave rotten raway rith rit, roo, rif rit reren't ror rou reddling rids, Raggy! at test_ruhroh.pl line 5