Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: A philosophical pondering concerning hexes

by ysth (Canon)
on Jun 23, 2004 at 08:28 UTC ( [id://368972]=note: print w/replies, xml ) Need Help??


in reply to A philosophical pondering concerning hexes

Your description of dec() is what oct() does, except for the "Assume decimal" line, which is pretty useless in perl.

At least it isn't named something horrid like strtoul.

Oh, and you've got reverse "backward". You pass it a reversed string and it returns a string in the correct order, so it is analogous to oct() after all :)

Update: oops; I missed the ? in (0x)?; oct() requires the 0x to be there. Sounds like what you ought to do is implement sscanf in POSIX.pm and use it instead of oct/hex.

  • Comment on Re: A philosophical pondering concerning hexes

Log In?
Username:
Password:

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

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

    No recent polls found