About two four years ago (wow, the time flies!), I was messing around with a script I wanted to run on a bunch of different systems, so I was doing a lot of OS detection. I just modified that slightly to check the code and the following syntax worked just fine:
if ($^O eq "MSWin32") { use Win32; }
I'll throw the rest of the OS detection craziness into my scratchpad, if anyone is interested in it.