in reply to Help needed with WIN32::Service

You need to prepend "\\" to the server name. (Update) I have seen evidence to the contrary.

Perl strings require that the backslashes be doubled.
Try:

Win32::Service::GetStatus("\\\\VL94196",'SendLogServer', \%status) or + die "Service status failed: $!"
Most likely, 'SendLogServer' is not the short-name for the service you seek.

The second parameter is the short name. You need to error-check the return, otherwise,$status{'CurrentState'} will be undef, and you will get the "uninitialized" warning.

     Syntactic sugar causes cancer of the semicolon.        --Alan Perlis

Replies are listed 'Best First'.
Re^2: Help needed with WIN32::Service
by the_hawk_1 (Scribe) on Jun 28, 2010 at 19:44 UTC
    Thanks NetWallah, but I forgot to mention that when I try this directly on the machine, it works well, but I can't do it remotly.

    So, I'm sure about the service name.

    I've also tried with the '\\\\' or the ip address, but both didn't work neither.

      Is there any indication in the "die" error message as to what the problem is ?

      How about the event logs, particularly the security logs ? There could be firewall or authentication issues.

           Syntactic sugar causes cancer of the semicolon.        --Alan Perlis

        The die message is empty! I really don't understand what's going on...

        Also, I can't figure out where the log are on my WinXp pro, running ActivePerl...