in reply to Convert unsigned long int (64bit) to binary string(64bits)

Do you get any hints for 64bits when you run perl -V? I am using Strawberry 5.16.3 64bit on Win7 and I get the following:

print unpack( "b64", pack( "Q", 4_294_967_295)), "\n"; print unpack( "b64", pack( "Q", 126_294_967_295)), "\n"; Result: 1111111111111111111111111111111100000000000000000000000000000000 1111111111000010001000111110011010111000000000000000000000000000

Replies are listed 'Best First'.
Re^2: Convert unsigned long int (64bit) to binary string(64bits)
by salva (Canon) on Dec 13, 2013 at 08:20 UTC
    It also works right for me on Ubuntu i386 which has Perl compiled with 64bit integers.
Re^2: Convert unsigned long int (64bit) to binary string(64bits)
by Anonymous Monk on Dec 13, 2013 at 15:34 UTC

    I ran perl -V | grep use64 and I got use64bitint=define, use64bitall=define,uselongdouble=undef. It seems to be running perfectly this morning though and I can't replicate the weird results I saw last night. Thanks for the help anyways.