pardon me, I realize this is more than likely a very simple
question, however, I cannot (for the life of me) figure
out why it doesn't work. I want to store the pattern of the
apache log and IIS log format in a regex type thing
($apache_log and $iis_log). I would also like to store a
string ($docuement and $document2) that happens to be something
I am looking for in the document (i.e. index.html or a specific query).
but my silly little script doesn't appear to work very well, ANY help would be greatly appreciated.
here is some code to do roughly what I am thinking:
# Hmm I know there is a better way to parse this
# open the log file - the log file we want to check out
open(LOG, "<$ARGV") || die("Could not open $ARGV : $!");
# open our Report file - the file we will write out report to
open(REPORT, ">$ARGV") || die("Could not open $ARGV : $!");
($ip, $day, $month, $year, $hr, $min) = $_ = $apache_log; # if I was
+ using IIS I would set this to $iis_log, is there a better way?
print REPORT "Access on doc1 from: $ip on $month $day at $hr:$min\n"
print REPORT "Access on doc2 from: $ip on $month $day at $hr:$min\n"
print REPORT "Total doc1: $totaldoc\n";
print REPORT "Total doc2: $totaldoc2\n";