in reply to Re: Pack function
in thread Pack function

With "n" i get 1000000000000000 in one binary and 1010010000000000 in the other.
With "N" i get 00000000000000001010010000000000 with both binaries.

Replies are listed 'Best First'.
Re^3: Pack function
by esskar (Deacon) on Aug 02, 2005 at 09:42 UTC
    perldoc -f pack says:
    n An unsigned short in "network" (big-endian) order.
    N An unsigned long in "network" (big-endian) order.

    IMHO it can't be endian problem!?!
Re^3: Pack function
by BrowserUk (Patriarch) on Aug 02, 2005 at 09:04 UTC

    One is running on a little-endian machine and the other on a big-endian?


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
    "Science is about questioning the status quo. Questioning authority".
    The "good enough" maybe good enough for the now, and perfection maybe unobtainable, but that should not preclude us from striving for perfection, when time, circumstance or desire allow.
      I am running the code on the same machine.

        Identical code on the same machine, different binaries producing different results.

        The only variable is the binaries?

        Conclusion: One of the binaries is broken.


        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
        "Science is about questioning the status quo. Questioning authority".
        The "good enough" maybe good enough for the now, and perfection maybe unobtainable, but that should not preclude us from striving for perfection, when time, circumstance or desire allow.