in reply to Re^2: Converting Hexadecimal to Decimal notation and vice-versa
in thread Converting Hexadecimal to Decimal notation and vice-versa

How do I convert a huge integer to hexadecimal

->as_hex()

Replies are listed 'Best First'.
Re^4: Converting Hexadecimal to Decimal notation and vice-versa
by Anonymous Monk on Oct 17, 2009 at 18:55 UTC
    Hi,
    I tried the following and I got 'NaN' as the result.
    #!/usr/bin/perl use strict; use warnings; package main; use Math::BigInt; my $gene_sample_101dcef = Math::BigInt->as_hex("5555181933400000000066 +6"); print $gene_sample_101dcef,"\n";

      You have to call the method on an already existing object instance, for example:

      print Math::BigInt->new("55551819334000000000666")->as_hex(), "\n";