From: Tristan Knowles Date: 2005-07-18T21:06:26+09:00 Subject: Re: Reading total lines of file then displaying in reverse? --- "David A. Black" wrote: > > File.readlines("my.log").reverse.each{|l| puts l} > > I believe that's identical to: > > puts File.readlines("my.log").reverse For my case, it now looks like this: lines = IO.readlines("my.log").reverse.each_with_index do |line, index| I'm trying to use .length somewhere now to count the number of lines. Tristan ___________________________________________________________ Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com