Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: Extra Long HEX to Decimal Converion Issue on Select Platforms

by awohld (Hermit)
on Jul 15, 2012 at 17:33 UTC ( [id://981910]=note: print w/replies, xml ) Need Help??


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!

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

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2024-03-28 22:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found