I found this article:
The Perl Journal - Controlling Modems with Win32::Serial Port Key sentence:
A pleasant surprise: SerialPort supports time limits much like alarm. Then comes a rather complicated discussion... I have not personally used Win32::Serial Port, but it appears that this article offers some big clues about what to do.
I suppose also if you switch to software in-band flow control, (XON XOFF) instead of hardware flow control, then the bits would just go into "never land" if the device is not connected.