#! /usr/bin/perl

# convert binary data to C-formatted comma-delimited hex bytes
binmode STDIN;
while (1) {
	$len = read(STDIN, $data, 16);
	break if $len < 1;
        @array = unpack("C$len", $data);
	for ($i=0; $i < $len; $i++) {
		printf "0x%02X,", $array[$i];
	}
      printf "\n";
	last if $len < 32;
}



