# CSC 310 Project # 4
#opening log and html file
open (LOG, '<', 'IN-access.log');
open (HTML, '>>', 'OUT-access.html');
#printing header/title/format of html
print HTML "
Visitors Log\n";
print HTML "The log file start date is: date()
\n";
print HTML "There were $IPcount unique visitors in the logfile.
\n";
print HTML "There were 2 visits yesterday
\n";
print HTML "| IP | LOGFILE |
\n";
#reading log file
while ($lines = ){
#keeps track of unique visitors
$oldIP = $remoteIP;
#assigning values
($remoteIP,$rfc,$userID,$dateTime,$timeZone,$requestType,$fileRequested,$requestProtocol,$statusCode,$sizeOfFile) = split ' ', $lines;
#keeps track of unique visitors
if ($oldIP ne $remoteIP){
$IPcount += 1;
}
....