#reading log file and assigning values while ($lines = ){ $remoteIP = $oldIP; ($remoteIP,$rfc,$userID,$dateTime,$timeZone,$requestType,$fileRequested,$requestProtocol,$statusCode,$sizeOfFile) = split ' ', $lines; if ($oldIP ne $remoteIP){ $IPcount += 1; } print "$IPcount\n"; ...