use strict; use warnings; use Math::BigInt; # Missing from your posted code my $x_dec = Math::BigInt->from_hex("0x000102030405060708090a0b0c0d0e0f"); print $x_dec, "\n"; # Not $x, as in your posted code # Output: 5233100606242806050955395731361295