in reply to Help using a tied filehandle from Win32::SerialPort in IO::Select

Thank you both for the quick responses. It figures that Windows can't handle it. In previous code I've made the serial port non-blocking, but in this code I need to wait a few seconds for the hardware to respond. It might respond immediately, after a few seconds, or not at all. I was hoping to use something like
$serial_select->can_read($timeout)
This would let me give it a little time, but I guess now I have to learn how to use SIG{ALRM}. Is there something better? Oh I've also found that in Windows, I can't catch SIG{INT} when the code is blocking on a $socket->accept() call. I had to make the socket non-blocking and stick it in a while(1) loop. This is normal (at least for Windows), right?
  • Comment on Re: Help using a tied filehandle from Win32::SerialPort in IO::Select
  • Download Code