I would use the Win32::SerialPort package. I use it for all of my communication with the scanners I support in my application. It makes debugging comm errors very easy and allows me to support multiple systems. Its only limitation is that it can't see comm ports past COM8. As for packing the data, can your old program handle it, if not don't pack....
Comment on Re: communication between socket and serial port