Hi everyone,
        I'm trying to read throu a 200meg+ error log
file. (I have no administrative rights on this server,
you see i'm just a programmer why would my boss think
i'd need access to a error log not as if it would make
my life easyer or anything...ok this rant is over)

I'm trying to read it throu a cgi...but if I try and
open the whole thing up. my browser crashes under the
memory needs.

The solution i'm using now is this.
is dirty and hogs much of the servers power when it
runs but at the moment it's the only way for me
to have access to this file.

<CODE>

open FICMSG, "<$logfile" or print "problem opening log file.";

$i=0;
while(!(eof FICMSG))
    {
    $msg[$i] = <FICMSG>;
    $_ = $msg[$i];
    if ($i < 40)
        {
        $i++;
    }
    else
        {
        $i=0;
        }
    }

for($i = 0; $i <= $#msg; $i++)
    {
    print "<b>Error $i:</b><br>$msg[$i]\n<br><br>";
    }

</CODE>


My question is...can we read the file backwards.
If I could set the reading pointer to the end
of the file and then work my way back 40 entries.
and print...now that would make my day.

anyone know of a way?


Dex



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to