in reply to sort hash keys as numbers and maybe even more...

there is no native order for that type (for example, I have an OO class called Book, it world be nice if I have a way to define the native order for this class as sort by ISDN number, which is an attribute of the Book class)

Sure, that works now, I should think. Overload cmp for the Book class, and sort an array of refs to Books. It should call your comparison code for each pair of Books it needs to figure out the order, without having to say so in the sort call.

—John