Maybe unrelated but as you are on Windows and using a 64bit perl (assuming this from the path name) you might be interested in Win32::SerialPort finally fixed for 64 bit Perl leading to this fix.
I can confirm that I can reproduce the bug using the OP's code with the $PortObj->read(1) method on a 64-bit Strawberry Perl, but the same code does not produce the error on a 32-bit version.
In reply to Re^2: How to read serial port with Win32::SerialPort?
by haukex
in thread How to read serial port with WIN32:SerialPort?
by mastertone
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |