Re: File.each can start from bottom of file?



Roger wrote:
Instead of iterating from first to last line in file,
can the each method go from last to first?

If no, any ideas to achieve this?

If your file isn't huge, use IO.readlines(filename).reverse.each

Cheers,
Dave
.