while (<$LOG_FILE>) { $error_count++ if /error/i; }