if($^O =~ /Win32/ ... would probably be better, as I'm quite sure that Richard will have tested it on Windows at some point and found it to work as it is on some combination of perl and Windows.
This won't clash with Cygwin, as in that case, $^O eq 'cygwin'.