Friday, July 25, 2008

Hexa to Decimal Conversion in Perl

k1 contains the hexadecimal value . to convert it into decimal we need
to do the following 2 lines coding.

$k1='0015';
$k1=hex($k1);
$dec = sprintf("%d", $k1);

No comments: