Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Why is pack("N",42949672965) giving me 00 00 00 05

by isync (Hermit)
on Feb 09, 2015 at 00:32 UTC ( [id://1115980]=note: print w/replies, xml ) Need Help??


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

Arg! Sure sign of too many hours on the keyboard... Fellow monks, thank you very much everyone!
  • Comment on Re: Why is pack("N",42949672965) giving me 00 00 00 05

Replies are listed 'Best First'.
Re^2: Why is pack("N",42949672965) giving me 00 00 00 05
by ikegami (Patriarch) on Feb 09, 2015 at 02:38 UTC
    You know you can use 0xFFFFFFFF, right?

      ... 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 ........

        Enjoy, Have FUN! H.Merijn
        @AnomalousMonk: well, didn't know that. but never liked the underscore notation for numbers, anyway... :)
      @ ikegami: yes, knew that.
        It was a rhetorical question. The implication is that you should have used 0xFFFF_FFFF. If you had, you wouldn't have made the error you did.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (5)
As of 2024-04-23 06:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found