Hi Though I am not very sure, but can we use inbuilt seek function in perl ?
Regards, Amit Saxena On Mon, Jul 7, 2008 at 12:39 AM, Rob Dixon <[EMAIL PROTECTED]> wrote: > loody wrote: > > > > I try to read the last line of a file directly instead of using > > while(<>) or something else to read each line until "undef" bumped to > > me. > > If you know some build-in functions or another modules for me to use, > > please help me. > > Like this. Both Fcntl and Tie::File are standard modules. > > HTH, > > Rob > > > > use strict; > use warnings; > > use Fcntl; > use Tie::File; > > tie my @file, 'Tie::File', 'filename', mode => O_RDONLY or die $!; > print $file[-1]; > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > http://learn.perl.org/ > > >