while (1) { my $Errorlog = Win32::EventLog::new(System) or die "Can't Read the Error Log\n"; $Errorlog -> Read(EVENTLOG_FORWARDS_READ, 0); &ErrorCheck; my %event = ( EventID => $ErrorCode, EventType => EVENTLOG_ERROR_TYPE, Computer => NULL, Source => "System", Strings => $Description ); $Errorlog -> Report(\%event); close $Errorlog; } sub ErrorCheck { if ($Errorlog == '0x683') { $ErrorCode = '0x683'; $Description = "Insert Error Description Here"; }