Help for this page

Select Code to Download


  1. or download this
    use if $^O eq 'MSWin32', 'Win32::SerialPort';
    use if $^O ne 'MSWin32', 'Device::SerialPort';
    
  2. or download this
    use if 1, $^O eq 'MSWin32
       ? 'Win32::SerialPort'
       : 'Device::SerialPort';
    
  3. or download this
    BEGIN {
       eval(
    ...
             : 'use Device::SerialPort; 1'
       ) or die $@;
    }