Last line of file/Perl

Startseite
Anhänge:
Nachricht
+ (text/plain)
Nachricht löschen
Nachricht beantworten
Autor: JD Austin
Datum:  
Betreff: 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;
}