in reply to Sending and reading hex commands on a Win32 serial port
hipowls beat me to it.
Yeilds:#!/usr/bin/perl -w open FH, '>foobar'; print FH pack 'H2H2H2H2', 'ab','cd','ef','00'; print FH pack 'H8','abcdef00'; print FH pack 'H2'x 4, 'ab', 'cd', 'ef', '00'; print `hd "foobar"`,"\n";
00000000 ab cd ef 00 ab cd ef 00 ab cd ef 00 + 0000000C
|
|---|