I'm porting my freeBSD code to Win32 and need to use a different ::SerialPort module depending on the platform
This doesn't work...
$platform = "win32"; # I really test $^O
if ($platform eq "win32") {
use Win32::SerialPort;
} else {
use Device::SerialPort;
}
Perl looks for both of them and fails with a "can't find".
What's the right way to do this?
Thanks, Dave
In reply to conditional USE MODULE by hennesse
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |