I have found two modules which implement some very nice methods for handling serial port communications - These are:
- Device::SerialPort - which implements its calls through termios library for *nix systems - I have used this module for some IVRS-type applications with little difficulty; and
- Win32::SerialPort - which implements its calls through Win32 APIs for Windows systems
It may be worth your while to have a look at these modules and some of the example code included in the module PODs to get a better idea about how you can implement your write and read calls to and from the serial port through Perl.
Ooohhh, Rob no beer function well without!