From: teresa nuagen Date: 2011-10-17T07:14:29+09:00 Subject: Re: writing a poem backwards or in reverse order Josh Cheek wrote in post #1026925: > On Sat, Oct 15, 2011 at 7:04 PM, Teresa Nguyen > wrote: > >> Reads the poem into the program and writes it to the screen backwards >> >> I know that I have to apply using a string called "split" in order to >> write backwards from last line to first line with the words in reverse >> order. Can you help me? >> >> -- >> Posted via http://www.ruby-forum.com/. >> >> > > Here are lots of little examples in cheatsheet format that might be > helpful: > > https://github.com/JoshCheek/ruby-kickstart/blob/71603420eb55132b69f0018b9142e11b5ca561dc/cheatsheets/strings.rb > > https://github.com/JoshCheek/ruby-kickstart/blob/71603420eb55132b69f0018b9142e11b5ca561dc/cheatsheets/arrays.rb thanks for your response. I've been trying to write this program rearranging a short poem. Can you give me an example of one method I can use to do this: Reads the poem into the program and prints the poem to the screen backwards from last line to first with the words of each line in reverse order and the characters in each word in reverse order. -- Posted via http://www.ruby-forum.com/.