You can use the "event viewer" to track logged error and status messages. From a command prompt, or the "Run" dialog, type "eventvwr" to bring up the event viwer, and examine recent APPLICATION and SECURITY messages.
Re: Getting perl to report errors - as others have indicated, the Win32:: code apparently does not place the errors in $!.
Instead, you need something like:
use Win32::Service;
use Win32;
...
if (! Win32::Service::GetStatus($host, $serviceName, \%status)){
die "Cannot get $serviceName status : $!\nWin Error:" . Win32::GetL
+astError() . "\n";
}
Syntactic sugar causes cancer of the semicolon. --Alan Perlis
|