develooper Front page | perl.beginners | Postings from February 2002

GURU question about use and modules...

Thread Next
Nikola Janceski
February 5, 2002 09:16
GURU question about use and modules...
Message ID:
Okay... this one is way out there...and I can't find answers in the docs for
this one.

I currently am working on a script for use on NT4 and SunOS, (windows and
now I thought that the following code would work... but no.

if ($^O =~ /^(ms)?(win|dos)(32|nt)?$/i){
	use lib "N:/njancesk/perllib";
	use Win32::Process;
	use Win32::Event 1.00 qw(wait_any);

	} else {
	use lib "/u/njancesk/perllib";


This is the error on UNIX:
Can't locate Win32/ in @INC ...

I want to use the Win32 modules only if it's run on an NT OS, but I do not
need them if it's on UNIX,
I am using the modules on NT to spawn processes. 

So how can I tell perl (use this module if OS is NT else use nothing)?

Nikola Janceski
Summit Systems, Inc.

The day after tomorrow is the third day of the rest of your life.
-- George Carlin

The views and opinions expressed in this email message are the sender's
own, and do not necessarily represent the views and opinions of Summit
Systems Inc.

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About