From: Tristan Knowles Date: 2005-07-18T20:57:40+09:00 Subject: Re: Reading total lines of file then displaying in reverse? Cool. That reverses the value of the lines ordered, but still lists the line numbers from 0 -> x. Anyway to reverse this also, x -> 0? Thanks again. --- Stefan Holst wrote: > Tristan Knowles wrote: > > How would I use File or IO to read all the lines > of a > > file, then display the contents in reverse? > > something like this? > > File.readlines("my.log").reverse.each{|l| puts l} > > RY > Stefan > > > ___________________________________________________________ Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com