Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Carp::Scooby

by stephen (Priest)
on May 10, 2002 at 20:07 UTC ( #165763=note: print w/ replies, xml ) Need Help??


in reply to Carp::Scooby

If you're feeling REALLY bizarre, you could indulge in a little argument-munging...

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; }
Then, if you say
ruhroh("And I'd have gotten away with it, too, if it weren't for you m +eddling kids");
You'll get
Rand Ri'd rave rotten raway rith rit, roo, rif rit reren't ror rou red +dling rids, Raggy! at test_ruhroh.pl line 5

stephen

Update: A little testing made me change my scheme entirely...


Comment on Re: Carp::Scooby
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://165763]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (10)
As of 2015-07-07 20:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (93 votes), past polls