<?xml version="1.0" encoding="windows-1252"?>
<node id="165763" title="Re: Carp::Scooby" created="2002-05-10 16:07:31" updated="2005-07-19 14:08:11">
<type id="11">
note</type>
<author id="2329">
stephen</author>
<data>
<field name="doctext">
If you're feeling REALLY bizarre, you could indulge in a little argument-munging...
&lt;code&gt;
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 &amp;croak;
}
&lt;/code&gt;
Then, if you say
&lt;code&gt;
ruhroh("And I'd have gotten away with it, too, if it weren't for you meddling kids");
&lt;/code&gt;
You'll get
&lt;code&gt;
Rand Ri'd rave rotten raway rith rit, roo, rif rit reren't ror rou reddling rids, Raggy! at test_ruhroh.pl line 5
&lt;/code&gt;
 
&lt;p&gt;
stephen
&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Update:&lt;/b&gt; A little testing made me change my scheme entirely...</field>
<field name="root_node">
165757</field>
<field name="parent_node">
165757</field>
</data>
</node>
