Hi all, I am working on the code below....
use strict; use warnings; my $hex = "43"; my $binary = unpack 'B*', pack 'H*', $hex; print "$binary\n\n"; my @fields = unpack 'A2A2A4', $binary; my $i; printf "%-4s => %s\n", $fields[$i++], $_ foreach qw/Ext TypeofNumber NumberingPlan/; **OUTPUT** 01000011 01 => Ext 00 => TypeofNumber 0011 => NumberingPlan But, now i have a hash(associative array), %TypeofNumber = ( 00 => Integer, 01 => Floating, 10 => Char, 11 => Double ); Using this hash, the type of number has to be specified in the output. As shown here: 01 => Ext TypeofNumber 00 => Integer 0011 => NumberingPlan I am unable to get the desired output? Thanks and regards, Dharshana