Hi kar_thik82,
What about keeping a running count of each event log, and then printing the total?
my @log_type =("Application", "Security", "Setup", "System", "Forwarde
+d Events");
my $total_events = 0;
foreach $logs_type (@log_type) {
#print "$logs_type\n";
Win32::EventLog::Open($EventLog, $logs_type,'')
or die "Could not open System log:$^E\n";
$EventLog->Win32::EventLog::GetNumber($numevents);
$total_events += $numevents;
# print "$EventLog->Win32::EventLog::GetNumber($numevents)\n";
}
print "Total number of events: $total_events\n";
Not exactly tested, but hopefully enough to illustrate the point.