Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Pig latin translation

by BUU (Prior)
on Oct 29, 2003 at 08:43 UTC ( [id://302941]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2024-04-23 20:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found