in reply to Re^2: Big Int to hex with 5.6
in thread Big Int to hex with 5.6

So you are using an older version of the module, you should upgrade the module if you want this functionality.

Replies are listed 'Best First'.
Re^4: Big Int to hex with 5.6
by ZlR (Chaplain) on Dec 12, 2004 at 22:26 UTC
    no. it will run on a large number of machines and i have no possibility to upgrade them all, moreover for a single functionality.
      Then I would strongly encourage you to not use the module at all. IIRC, there was an initial attempt to convert the perl4 bigint facilities to a perl5 module that then languished in an incomplete and buggy state for years. Only lately has the module been maintained and improved (and made much faster). To quote the doc you linked to:
      BUGS The current version of this module is a preliminary version of the rea +l thing that is currently (as of perl5.002) under development.
      Seeing that 5.002 in 5.6 should give you a clue that nobody was bothering much about it for a long time.

      OTOH, if the bugs aren't biting you, they aren't biting you.

        Arg ! But i need a way to do it ! Here's a nice function i found that converts from hex to dec using only one BigInt.
        #!perl use strict; use Math::BigInt; sub HeX { my $n = shift; $n = '0' x (4 - (length($n) % 4)) . $n; my $m = Math::BigInt->new(0); while (my $o = substr($n, 0, 4, '')){ $m = $m * 65536 + hex $o; } $m; }
        I'm trying to find a way to do something similar but from dec to hex . Maybe you have an idea ?