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

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";

Replies are listed 'Best First'.
Re^5: Converting Hexadecimal to Decimal notation and vice-versa
by almut (Canon) on Oct 17, 2009 at 19:08 UTC

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

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