in reply to Re: Why is pack("N",42949672965) giving me 00 00 00 05in thread Why is pack("N",42949672965) giving me 00 00 00 05
... or even 0xFFFF_FFFF or 4_294_967_295 for that matter.
Give a man a fish: <%-(-(-(-<
Why not simply use -1?
$ perl -MDP -we'DHexDump pack ("N", -1)' 0000 ff ff ff ff .... $ perl -MDP -we'DHexDump pack ("Q", -1)' 0000 ff ff ff ff ff ff ff ff ........ [download]