Thread Logfile, maximal 10 Zeilen (3 answers)
Opened by roooot at 2010-12-02 18:31

GwenDragon
 2010-12-02 19:16
#143277 #143277
User since
2005-01-17
14761 Artikel
Admin1
[Homepage]
user image
Wie wäre es mit CPAN:File::Tail?

Code (perl): (dl )
1
2
3
4
5
use File::Tail;
my $logfile=File::Tail->new(name=>$filename, tail=>10);
while (defined(my $line=$logfile->read)) {
      print "$line";
}
ungetestet.
Last edited: 2010-12-02 19:32:32 +0100 (CET)

View full thread Logfile, maximal 10 Zeilen