in reply to Conditional use of Win32::TieRegistry
you can check $^O to see if you are running on windows: see perlvar then require the module and eventully import, if the module uses Exporter's import.
if ($^O eq 'MSWin32'){ require Win32::TieRegistry; Win32::TieRegistry -> import if Win32::TieRegistry -> can ("import" +); }
See also use module if condition is met for suggestion about if module.
PS this kind of things are worth to reside into a BEGIN block.
L*
|
|---|