Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

RE: (2) Pig Latin (another smidge closer)

by ybiC (Prior)
on Jul 23, 2000 at 17:35 UTC ( #23977=note: print w/ replies, xml ) Need Help??


in reply to Re: Pig Latin
in thread Pig Latin

Adding qu| at the front of $1 and removing q from [...] provides support for the "qu" combination.   My first attempted tweak was to add (qu) inside $1's [...] but that hosed things for words like "jumped".

Bonus points for guessing the cliche phrase I tested this with.  <grin>

#!/usr/bin/perl -w use strict; while(<>) { s{ \b(qu|[bcdfghjklmpnrstvwxyz]*)([aeiou]+)(\w*) } { if($1) {$2.$3.$1.'ay'} else {$2.$3."way"} }egix; print; } # END
    cheers,
    ybiC


Comment on RE: (2) Pig Latin (another smidge closer)
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (7)
As of 2015-07-07 09:41 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 (88 votes), past polls