Hi Monks,
I need to make my perl script work on both Windows and
Unix. I'm using "use Win32:service" statement in my script
for querying status of some windows "services". On Unix,
the same script queries the unix processes.
But, when the script is run on Unix, I get a compilation
error as:
Can't locate Win32/Service.pm in @INC (@INC
contains: /usr/perl5/5.00503/sun4-
solaris /usr/perl5/5.00503 /usr/perl5/site_perl/5.005/sun4-
solaris /usr/perl5/site_perl/5.005 .).....
Is it possible to use this statement in my script and not
get this error message on unix ??
Something like this would help --
#ifdef WIN_OS
// do something that is very windows specific - like:
use Win32::Service;
#else // unix
// do something like "ps -eaf" etc
#endif
thanks !!
-Ajith.