As a shortcut for the sequence:
BEGIN {
if ($^O eq "MSWin32")
{
require Win32;
Win32::->import(); # or ...->import( your-args ); if you passed import arguments to use Win32
}
}
you can use the if pragma:
use if $^O eq "MSWin32", "Win32"; # or ..."Win32", your-args;