in reply to Processing a log file

There's nothing special about reading a large file in perl (or in C, for that matter). You just open it, and read it a line (or block) at a time:
open(IN, "access_log") || die "Can't open file: $!"; while(<IN>) { ... process the line ... } close(IN);
Of course here it's the ...process the line... bit that does all the interesting stuff, like parsing the access_log line to extract the information that interests you.

I haven't checked, but I wouldn't be surprised if there was already a module on CPAN which does access_log parsing.

Michael

Replies are listed 'Best First'.
Re: Re: Processing a log file
by BUU (Prior) on Dec 31, 2003 at 20:28 UTC