in reply to Re^4: Exasperated with 64-bit integer builds of perl
in thread Exasperated with 64-bit integer builds of perl

I should have mentioned pack("Q", $string) first - but I can't recompile Perl in 64 bits here in the office to test it anyway :(
__________________________________________________________________________________

^M Free your mind!

  • Comment on Re^5: Exasperated with 64-bit integer builds of perl

Replies are listed 'Best First'.
Re^6: Exasperated with 64-bit integer builds of perl
by syphilis (Archbishop) on Jun 01, 2007 at 07:50 UTC
    I should have mentioned pack("Q", $string)

    Doesn't seem to DWIM:
    C:\_64>perl -e "$_=unpack('Q',pack('Q','1.44115188075868217e+017'));pr +int" 144115188075868224 C:\_64>
    I believe it just packs the NV into the quad.

    Cheers,
    Rob
      Hmmm, then that leaves me with one last suggestion: Math::BigFloat and Math::BigInt.
      __________________________________________________________________________________

      ^M Free your mind!