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