use if $^O =~ /Win32/, "Win32"; use if $^O =~ /Win32/, "Win32::TieRegistry"; use if $^O =~ /Win32/, "Win32::SerialPort"; use if $^O !~ /Win32/, "Device::SerialPort";