I haven't used this particular Perl module, but I've had some experience with RS-232 devices before. This is, in general, a "painful process".
There are some control signals, like CTS (Clear-To-Send) and RTS (Request-To-Send) - these are actual hardware lines between the 2 devices. They control whether or not you are able to send or receive a new characters.
In the "modern era", it is usually better to use in-band flow control because the hardware chip doing the RS232 will have at least 16 bytes of buffer.
If I'm not ready to receive more info, I will send a "shut up" command, an XOFF. Your RS232 chip is still sending stuff while my IC is sending that, but there is enough buffer for me to get additional characters while you are thinking about it. Modern RS232 chips are smart and process this "shut up" message quickly.
This does not appear to be a problem in this case, but most USB to serial port devices do not handle the normal RS232 signals correctly. Some do. "Most don't handle correctly" does not mean "all do not" - this is a "heads up" - that many do not.
To confound this whole business further, In the "beginning of time": computers talked only to modems. Now computers talk to computers and this really complicated the terminology. A "null modem cable" is sometimes required. This just swaps the transmit and receive pairs of these hardware flow control signals.
Anyway if we are using software, in-band flow control instead of CTS,RTS, then if you are "not there" my sent bits will just go to the "bit bucket" because you are not there telling me that I cannot send. I don't get "hung up on the transmit" part.
The "time-out part" happens on the receive at my end.
It appears to me that the OP is using Hardware Flow Control (the CTS,RTS hardware lines).
Program hangs on the "write" because there is not a CTS (Clear-To-Send) hardware signal (a specific line on the RS232 interface) from the other side. But the article I mentioned explains how to time this out. It was written in 1999. The advice as written appears to me to be still good although the use of software flow control is much more prevalent a decade later.
AN OFF TOPIC - OH My GOSH!
Some cheapo computers only use +5V for a "psuedo RS-232" signal. RS-232 defines a "true" value as +12V not +5V! Some "cheapo" computers simply do not supply enough voltage on their "quote RS-232 ports" to be interfaced with compliant devices. Be aware of this - I've seen it.