in reply to A philosophical pondering concerning hexes
I like the idea you are presenting but I balk at your interpretation that oct() and hex() convert or return decimal. They consume a properly formed string and return a number. Perl happens to stringify numbers as their decimal representation. It is only incidental that print hex "0x20" appears to be a hex_string->decimal converter. It is just a hex_string->number converter.
I am not quite sure what the name for numify_hex_string() should be. unhex() is awkward and is still not descriptive of its function.
I also note that oct() doesn't happily consume non-octal data. It just screws up when you do that.
|Replies are listed 'Best First'.|
Re^2: A philosophical pondering concerning hexes
by tinita (Parson) on Jun 24, 2004 at 11:08 UTC