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

Re: Pack function

by esskar (Deacon)
on Aug 02, 2005 at 06:56 UTC ( #480098=note: print w/replies, xml ) Need Help??

in reply to Pack function

Which one do you get? 1010010000000000 or 00000000000000001010010000000000? If you get the big one, the one perl probably is build using 64bit or something similar!

Replies are listed 'Best First'.
Re^2: Pack function
by vrajan (Novice) on Aug 02, 2005 at 07:55 UTC
    With "n" i get 1000000000000000 in one binary and 1010010000000000 in the other.
    With "N" i get 00000000000000001010010000000000 with both binaries.
      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!?!

      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.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2023-02-04 03:31 GMT
Find Nodes?
    Voting Booth?
    I prefer not to run the latest version of Perl because:

    Results (30 votes). Check out past polls.