I have found two modules which implement some very nice methods for handling serial port communications - These are:
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.