From: Josh Cheek Date: 2011-10-17T05:26:30+09:00 Subject: Re: writing a poem backwards or in reverse order --20cf3002584c12812604af704e05 Content-Type: text/plain; charset=ISO-8859-1 On Sat, Oct 15, 2011 at 7:04 PM, Teresa Nguyen wrote: > i would like to write a poem using nano and through ruby I would like to > do the following: > > Program 1: > > Reads the poem into the program and writes it to the screen backwards > from last line to first. > > Program 2: > > Reads the poem into the program and writes it to the screen backwards > from last line to first with the words of each line in reverse order. > > Program 3: > > 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. > > I'm new to ruby and I have been trying to play around with it. Can you > help me approach this problem. > > 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 --20cf3002584c12812604af704e05--