Hey, sorry to bother you, but what about something else than Perl.
I found this soft developed in C# http://csharp.simpleserial.com/
(with its source code).
Like I did, you easily can modify the code in order to do whatever you want, the code is quite easy to understand (for a beginner like me).
I used it to create my own Terminal with the Serial Port and the BaudRate to choose. It works fine with my Arduino through USB / Bluetooth, since it's basically serial.
And Visual Studio Express is free.
Maybe this post won't suit you, in that case, I apologize