Help for this page

Select Code to Download


  1. or download this
    BEGIN {
        if ($^O =~ /Win32/) {
    ...
    use Win32::SerialPort;
    
    .. rest of your logic ...
    
  2. or download this
    use if $^O =~ /Win32/, "Win32";
    use if $^O =~ /Win32/, "Win32::TieRegistry";
    use if $^O =~ /Win32/, "Win32::SerialPort";
    use if $^O !~ /Win32/, "Device::SerialPort";