Help for this page

Select Code to Download


  1. or download this
    sysopen(COM,COM1,O_RDWR) || die "Can't open COM1 $^E";
    
  2. or download this
    #code to send data to port
    syswrite(COM,$string);  #sends $string to COM1
    ...
    #code to read data from port
    sysread(COM,$buf,$length);      #read $length bytes
    $received = unpack("C*",$buf);  #unpack them