Hi,
I am using an example from Dave Roth's Win32 Perl
Programming but I get no output. Is there something I
am doing wrong? I am Activestate Perl 5.8 on an XP pro
pc.
Thanks
Clarence
#
use Win32::EventLog;
$SecPerWeek = 7*24*60*60;
$Now = time();
$WeekAgo = $Now - $SecPerWeek;
$Event = new Win32::EventLog("System") || die "Unable
to open event log.\n";
if ($Event->GetNumber($Num))
{
$Flag = EVENTLOG_BACKWARDS_READ | EVENTLOG_SEEK_READ;
do {
if ($Event->Read($Flag,$Num,\%Hash))
{
if ($Hash{EventType} == EVENTLOG_ERROR_TYPE)
{
print "$Hash{Source} on $Hash{Computer} indicated
an error.\n";
}
else
{
undef %Hash;
}
}
$Num = 0;
} while ($WeekAgo < $Hash{TimeGenerated});
Win32::EventLog::CloseEventLog($Event->{handle});
}
__________________________________________________
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs