http://www.perlmonks.org?node_id=3589


in reply to Pig Latin

A more concise (not to mention obfuscated) way to do it: s@#(\w)(\w+)@#$1=~m#aeiou#i?$1.$2.'way':$1.$2.$1.'ay'@#egi;