in reply to Selective use of Use
You can find out which operating system you are running on by looking at the $^O variable (see perlvar for details).
The easiest way to conditionally "use" modules is to replace the "use" with calls to "require" and "import" - as these are executed at runtime.
if ($some_condition) { require SomeModule; SomeModule->import; } else { require SomeOtherModule; SomeOtherModule->import; }
Alternatively, you could look at if.
"The first rule of Perl club is you do not talk about
Perl club."
-- Chip Salzenberg
|
|---|