The following code works for me:
use strict; use Test::More tests => 3; sub encode_BCD { return pack 'H*', join '', @_ }; is encode_BCD("123456"), "\x12\x34\x56"; is encode_BCD("00",3456),"\x00\x34\x56"; is encode_BCD("1",2),"\x12";
In reply to Re^3: Encoding BCD
by Corion
in thread Encoding BCD
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |