in reply to Re^6: Win32::SerialPort, buffer overflow
in thread Win32::SerialPort, buffer overflow

That... is a truly strange workaround you have there. I can't imagine how that is different from '=', nor do I expect it to change execution speed much. Is there any chance that the difference is the 'die' that stops you from sending any other codes?

The most relevant "gotcha" compared to what you're doing here would be if something inside Serial_TrxRcv tried checking whether you gave it a number or a string, in which case $ccmd could have picked up a "dualvar" nature (both a number and a string) which gets removed by assigning a string constant (in certain perl versions). But, you already showed us the code of Serial_TrxRcv and the first thing in there concatenates it with "\r" which will always treat it as a string.

  • Comment on Re^7: Win32::SerialPort, buffer overflow