1

How to convert 64 bits integer represented as decimal string into hex string? I need to do it in Perl on system that doesn't support Quads.

2 Answers 2

3
use Math::BigInt;
my $decimal_string = '123456789123456789';
$hex_string = Math::BigInt->new($decimal_string)->as_hex();
Sign up to request clarification or add additional context in comments.

Comments

0

use bignum;

2 Comments

While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes.
@simont: "use bignum" is my answer. The link is only for reference.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.