in reply to Porting code between NT/Unix
if ($^O =~ /Win32/i) { do this; } else { do that; } [download]