use bigint; my $n = 123456789123456; my ($h, $d); while ($n > 0) { $d = $n % 16; $n /= 16; $h .= sprintf "%x",$d; } print scalar reverse $h;
In reply to Re^2: long integer to hexadecimal conversion
by kikuchiyo
in thread long integer to hexadecimal conversion
by perl_fan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |