Subject: | Error in translation h2d if h<10 |
Date: | Thu, 18 Jan 2007 12:26:09 +0100 |
To: | bug-Data_Translate [...] rt.cpan.org |
From: | "Heiko Menk" <hme [...] gmx.net> |
Hi,
there seems to be a problem translating hex values < 10 to decimal values.
---------------------------------------
use Data::Translate;
my $data=new Translate;
my @hh=qw(01 02 09 0A 0B 0C 0D 0E 0F 10);
print "\nTranslating Hex->Decimal...";
($s,@hd)=$data->h2d(@hh);
print "done\n--> ",join(' ',@hd),"\n";
---------------------------------------
...results in:
"Translating Hex->Decimal...done
--> 1 2 0 0 11 0 0 14 15 16"
which should be:
1 2 9 10 11 12 13 14 15 16
using Data::Translate v. 0.2
(Perl 5.6.1 Win32 and Perl 5.8.3 x86_64-linux)
best regards.
Heiko
--
If it doesn't fit - use a bigger hammer.
Miles O'Brian