I want to read my error_log and print out only the last 25 lines.

If I use this script:

$tekst_file = "/www/logs/error_log";
open (BESTAND, "$tekst_file");
my @temp = <BESTAND>;
close(BESTAND);

@lines = reverse(@temp);

$start = 0;
$end = 24;

for(my $a = $start; $a <= $end; $a++)
{
$lines[$a] =~ s/</&lt\;/g;
$lines[$a] =~ s/>/&gt\;/g;

print <<ENDOFTEXT;

$lines[$a]<BR>
ENDOFTEXT
}

I see nothing, is it becouse the file is to large, its about 58600 lines large.
If I use this script on a small file it works perfect.

Any idea's are very welkom.


Met vriendelijke groet,

Multi-Graphics
Eelco Alosery
Koekoeksbloem 11
8255 KH Swifterbant
Tel : 0321-380014
Fax : 0321-843340
[EMAIL PROTECTED]
www.multi-graphics.nl
www.hostingspot.nl

Reply via email to