cybermack72 has asked for the wisdom of the Perl Monks concerning the following question:

I'm having probs with the Win32:EventLog module connecting and processing remote machines' Event Logs. Below is the code. It connects to the remote registry but does not return the text of the event.
use strict; use Win32::EventLog; my ($recs, $base, $x, $hashRef); my $myServer = "\\\\MediaOne"; open(EVENTLOG, ">eventlog_dump.txt") || die "Can't open the file\n"; my $handle=Win32::EventLog->new("System", $myServer) || die "Can't ope +n Application EventLog\n"; $handle->GetNumber($recs) || die "Can't get number of EventLog records +\n"; $handle->GetOldest($base) || die "Can't get number of oldest EventLog +record\n"; while ($x < $recs) { $handle->Read(EVENTLOG_FORWARDS_READ|EVENTLOG_SEEK_READ, $base+$x, + $hashRef) || die "Can't read EventLog entry #$x\n"; if ($hashRef->{Source} eq "SNMP") { Win32::EventLog::GetMessageText($hashRef); print EVENTLOG "Record: $hashRef->{Message}\n"; } $x++; }

Title edit by tye