in reply to Re^2: Encoding BCD
in thread Encoding BCD
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";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Encoding BCD
by Anonymous Monk on Feb 27, 2009 at 22:48 UTC | |
by Corion (Patriarch) on Feb 28, 2009 at 08:32 UTC |