Pig Latin Encoder:
perl -lpe 's/([^\Waeiou]*)(\w+)/$2.($1||"w")."ay"/ge'
(pipe it standard input)
 
Sample input:
where is the trash?
Output:
erewhay isway ethay ashtray?