in reply to dynamic loading modules

See if:
use if 'MSWin32' eq $^O, Win32; if ('MSWin32' eq $^O) { my $osname = MSWin::GetOSName(); }
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Replies are listed 'Best First'.
Re^2: dynamic loading modules
by sdetweil (Sexton) on Sep 03, 2012 at 15:23 UTC
    I am already inside an If on the Os 'MSWin32', and do NOT have any 'use Win32' coded anywhere in my application.

    the code works fine, and requires these missing win32 modules when compiled on the unix platforms.

    I don't know what makes it work as is

      use if is not an if. It moves the decision whether to use the module or not into the compilation phase (as BEGIN does).
      لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ