in reply to Re: Extra Long HEX to Decimal Converion Issue on Select Platforms
in thread Extra Long HEX to Decimal Converion Issue on Select Platforms

Okay, so what I ended up doing was:
my $n = Math::BigInt->new('0x3BFA281009296F2'); my $manufacturer = sprintf("%010s", $n->bstr );
I uploaded the revised module and hopefully this time it passes on all systems.

Thanks for the help!
  • Comment on Re^2: Extra Long HEX to Decimal Converion Issue on Select Platforms
  • Download Code

Replies are listed 'Best First'.
Re^3: Extra Long HEX to Decimal Converion Issue on Select Platforms
by Jim (Curate) on Jul 15, 2012 at 23:20 UTC

    Curiously, this works, too:

    my $n = Math::BigInt->new('0x3BFA281009296F2'); my $manufacturer = sprintf "%010s", $n;

    So the temp variable $n can be eliminated:

    my $manufacturer = sprintf "%010s", Math::BigInt->new('0x3BFA281009296F2');

    I didn't test this on multiple platforms. I'm only pointing it out because I noticed an allusion to it in the Math::BigInt documentation.

    Jim