Where did you read that $! would hold useful information about errors from Win32::EventLog ? You should check $^E instead (not that the module documentation bothers to tell you this). And testing shows that Win32::EventLog->new() doesn't return a false value for failure, *sigh*. So change your code to something more like:
$EventLog= Win32::EventLog->new( "$eventtype", "$servername" ) or die $^E; die $^E if ! $EventLog->{handle}; $EventLog->GetOldest( \$first ) or die $^E;
And you'll probably see that you don't have privilege to read remote event logs from the security context of a CGI script (since Win32 CGI scripts are usually run in a security context that has no access to Win32 network resources).
I suspect there is a FAQ on how to access network resources from an IIS script that you could find.
- tye
In reply to Re: win32::eventlog file descriptor errors on IIS Server ($^E)
by tye
in thread win32::eventlog file descriptor errors on IIS Server
by jrdeinhard
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |