<?xml version="1.0" encoding="windows-1252"?>
<node id="3586" title="Pig Latin" created="2000-02-16 20:25:06" updated="2005-08-13 20:00:36">
<type id="115">
perlquestion</type>
<author id="979">
vroom</author>
<data>
<field name="doctext">
&lt;p&gt;For a programming exercise in one of my C/C++ classes we had to write a program that would translate from English to Pig Latin:
&lt;p&gt;The rules for this translation are as follows:
&lt;p&gt;a) For any word starting with one or more consonants, move the starting consonants to the end of the word and append ay
&lt;p&gt;b) for any word starting with a vowel simply append way
&lt;p&gt;c) any other characters can be ignored and all letters can be assumed to be lowercase
&lt;p&gt;I'm curious to see just how little code someone can do this in.
&lt;p&gt;&lt;B&gt;Clarification:&lt;/B&gt;
&lt;PRE&gt;
this is the time for all good me no
come to the aid of their country.
Should become:
isthay isway ethay imetay orfay allway oodgay enmay otay
omecay otay ethay aidway ofway eirthay ountrycay
&lt;/PRE&gt;
[vroom]</field>
</data>
</node>
