Last line of file/Perl

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: JD Austin
Date:  
Subject: Last line of file/Perl
> I need to open a file and just read in the last line, can anyone
> throw me a bone?
>
> v/r
> -Mike
> ---------------------------------------------------
> PLUG-discuss mailing list -
> To subscribe, unsubscribe, or to change you mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss

Heres a snippet that just opens a file and prints the contents:

open (INFILE,"< $file") or die "Can't open $file file!\n";
while (<INFILE>){
$line=$_;
print $line;
}