#! /usr/bin/perl # 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"; <----HERE!!! print HTML "There were 11 unique visitors in the logfile.
\n"; print HTML "There were 2 visits yesterday
\n"; print HTML "\n"; #reading log file and assigning values while ($lines = ){ ($remoteIP,$rfc,$userID,$dateTime,$timeZone,$requestType,$fileRequested,$requestProtocol,$statusCode,$sizeOfFile) = split ' ', $lines; print HTML "\n"; }
IPLOGFILE
$remoteIP$remoteIP $rfc $userID $dateTime $timeZone $requestType $fileRequested $requestProtocol $statusCode $sizeOfFile