Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

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

by almut (Canon)
on Oct 17, 2009 at 18:48 UTC ( [id://801782]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://801782]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (8)
As of 2024-04-18 07:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found