$x= "0x0081def509be"; use Math::BigInt; sub bighex{ my $x = shift; return Math::BigInt->new(hex($x)) if 8 > length $x; return (bighex(substr $x,0,-4)<<16) + hex substr($x,-4); } $d = bighex($x); print "$d\n";
In reply to Re: Convert Hex to BigInt
by I0
in thread Convert Hex to BigInt
by gargsan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |