my $s = '0x010203';; ## Skip over the '0x' and extract the next 4 bytes ## then pack those 4 hex characters to binary my $bin = pack 'H*', unpack 'xxA4', $s;; ## unpack the binary back to hex to check it worked. print unpack 'H*', $bin;; 0102
In reply to Re: converting ASCII hex into binary
by BrowserUk
in thread converting ASCII hex into binary
by gri6507
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |