Hi, I wanted to delete some entries in The NT EventLog in the category Application: I have this code:
use Win32::EventLog; use GetMyRegPath; my $CMPath = GetMyRegPath::GetCygwinMountsPath(); use Time::CTime; my ($Event, @timearray, $filename, $day, $month, $directory); # Where do you want to put the backup files? $directory = "$CMPath/EventLogs/"; unlink <$directory/*> if -r $directory; for ('Application') { $Event = new Win32::EventLog ("$_", ""); @timearray=localtime(time); $month = sprintf ('%.2d', $timearray[4] +1); $day = sprintf ('%.2d', $timearray[3]); $filename = $directory . ($timearray[5]+1900) . '_' . $month . '_' . $day . '_' . $_ . '.events'; $Event->Clear($filename); sprintf $filename; #`gzip -9 $filename`; } # End for It works quite well but now I wanted to delete only special entries like this: ..... for ('Application/cygwin') && for ('Application/in.tftpd) ....... But it didn't work it deletes nothing. How can I do to delete special items in the NT Event Log Application category ? Thanks. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]