On Nov 19, 2007, at 9:07 AM, Xavier Noria wrote:

> On Nov 19, 2007, at 3:38 PM, Shuaib Zahda wrote:
>
>> I was trying to find a method to read only the last line of a file. I
>> checked the the documentation and there is no such method.
>> Beside reading line after line and checking the the eof method. Is  
>> there
>> any faster or shorter way to do that.
>
> In Perl there's File::ReadBackwards:
>
>   http://search.cpan.org/~uri/File-ReadBackwards-1.04/ReadBackwards.pm

I ported this library as a solution to an old quiz:

   http://rubyquiz.com/quiz64.html

It's a gem now, so you can do:

   gem install elif

James Edward Gray II