in reply to Why is pack("N",42949672965) giving me 00 00 00 05

Because template 'N' is for a unsigned 32-bit value, but 42949672965 requires 36-bits: 0xA_0000_0005; so the high 4-bits are discarded leaving: 0x0000_0005.

If your Perl is capable, use 'Q' instead for integers > 32-bit.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". I'm with torvalds on this
In the absence of evidence, opinion is indistinguishable from prejudice. Agile (and TDD) debunked
  • Comment on Re: Why is pack("N",42949672965) giving me 00 00 00 05