Last line of file/Perl

JD Austin plug-discuss@lists.plug.phoenix.az.us
Thu, 14 Nov 2002 13:48:18 -0700 (MST)


> 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 - PLUG-discuss@lists.plug.phoenix.az.us
> 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;
}