There may be a better way, but this should work (untested):
open(FILE,"$thefile") || die "Can't open $thefile: $!\n";
@file=<FILE>;
close(FILE);
$lastline=pop(@file);
-----Original Message-----
From: Ricardo Cumberbatch L. [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 15, 2001 9:24 AM
To: Perl-Unix-Users
Subject: [Perl-unix-users] Read the Last line in a file
Hi every one I had to do a perl script but a need to know how in perl you
do to read the last line in a file, I no to read in a file but how to read
every time a need the last line in a file.
Thanks for the help folk...
R.C.L. ( ^_^ )
_______________________________________________
Perl-Unix-Users mailing list. To unsubscribe go to
http://listserv.ActiveState.com/mailman/subscribe/perl-unix-users
_______________________________________________
Perl-Unix-Users mailing list. To unsubscribe go to
http://listserv.ActiveState.com/mailman/subscribe/perl-unix-users