reading error_log
[email protected] (Eelco Alosery) Sat, 25 Jan 2003 00:50:31 +0100
| Newsgroups | perl.macperl.anyperl |
|---|---|
| Message-ID | <[email protected]> |
--Apple-Mail-17-720521867
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=US-ASCII;
format=flowed
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/</<\;/g;
$lines[$a] =~ s/>/>\;/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
--Apple-Mail-17-720521867--