#! C:\perl\bin\perl.exe use strict; use warnings; use Win32::SerialPort ; my $PortObj = new Win32::SerialPort ("COM1") || die "Can't open port\n"; $PortObj->baudrate(9600); $PortObj->parity("none"); $PortObj->databits(8); $PortObj->stopbits(1); $PortObj->write_settings || undef $PortObj; my $stt = pack 'H16', 'FF010003005F630A' ; $PortObj->write($stt); $PortObj->close || warn "Close Failed!\n"; undef $PortObj;