From: Lee Jarvis Date: 2007-11-21T20:29:58+09:00 Subject: Re: Read last line of a file Shuaib Zahda wrote: > Hi > Sorry for posting late > > I was trying to figure out how to use this method but I failed. Can u > please give me an example It works just like File#each, except in reverse order.. http://elif.rubyforge.org/ for documentation. You could also just do something like this.. File.readlines(file).reverse_each { But of course, that reads the whole file into an array first, so I would still to using elif. Regards, Lee -- Posted via http://www.ruby-forum.com/.