From: teresa nuagen Date: 2011-10-17T07:35:06+09:00 Subject: Re: writing a poem backwards or in reverse order > def reverse_words(line) > end > > contents = File.read("poem") > puts contents > > my_file = File.new("poem") > line_array = my_file.readlines() > line_array.reverse! > line_array.each { |line| puts reverse_words(line) } > > my_file.close Alright, thank you. Is there a same method but using string? is def reverse_words(line) end included in the beginning of the file? -- Posted via http://www.ruby-forum.com/.