Perl problem - COM ports and filehandles

Mark Overmeer mark at
Thu Feb 2 12:07:55 GMT 2012

* Darren Harwood (darren.harwood at [120201 17:08]:
> i am trying to convert a perl script from *nix to win32.
> i am having difficulty with a couple of things:
> 1) the unix script opens a filehandle to a device like this:
> my ($nfound, $timeleft) = select($rin, undef, undef, $timeDelimiter_s);
> thoughts on equivalent code?
> my $ob = Win32::SerialPort->new ('COM8') || die;

The POSIX select() is supported under Windows, however... in its
minimal implementation: only network sockets... afaik.

I expect the same is true for poll()  (WSApoll on Windows)
And a COM port is not a socket, is it?

Even the UNIXes have different levels of support.  They all support
pipes and devices, some do support file-io to be in there.

(warning: I never use Windows so this knowledge is only from
(outdated?) man-pages)


       Mark Overmeer MSc                                MARKOV Solutions
       Mark at                          solutions at         

More information about the mailing list