Denis Peuziat wrote:

Hi,

I'm a newbie with perl and I don't know much about programming either. I
wrote a script to manipulate services on Windows, and it works fine :


sub Stop_Service {
print LOGFILE "Stopping $_[0] on $_[1] ...\n";
Win32::Service::StopService($_[1], '$_[0]');
That shall be:
Win32::Service::StopService($_[1], $_[0]);

sleep(5);
Win32::Service::GetStatus($_[1], '$_[0]', \%status);
And that shall be:
Win32::Service::GetStatus($_[1], $_[0], \%status);

What you are doing in your orignial code is to pass the string $_[0] to GetStatus and StopService,
and not the value of $_[0].

regards,
Reinhard
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to