in reply to Pig latin translation

Bearing in mind the possible homework nature of this question and going on mostly blind optimism that he really does want some tips and not a solution:
  1. Use split to seperate the words. You probably want to split on a space and then disregard punctuation somehow, either delete it entirely or remove it and then restore at the end
  2. foreach word in the list you got from split, use substr to find the first letter
  3. You can then append data by using either the contecate operator: . or just double quotes in the form: $variable="${variable}new_data";, but this case is tailor made for using the appending form of the contecate operator
  4. Assemble the list of words back together again, restore punctuation and you have yer sentence.