in reply to Accessing serial ports under Windows

You probably ought to check the return values of sysread and syswrite. They both return undef on error:
$result = syswrite(COM, $data); if (defined $result) { print "$result bytes written\n"; } else { die "Couldn't write to port.\n"; }
Of ourse, there's always the CPAN module Win32::SerialPort.

Replies are listed 'Best First'.
RE: Re: Accessing serial ports under Windows
by Odud (Pilgrim) on Jun 18, 2000 at 00:00 UTC
    I supposedly searched CPAN this afternoon and found nothing! - in my defence my twin daughters were climbing on me at the time. But you are quite correct I should not assume that the syswrite and sysread are working.