in reply to are perl hash keys always strings?

They are "strings", although they aren't internally stored as Perl strings. You can use any other type as key, but it will be stringified - and that's usually a one-way operation. (For instance, you typically cannot retrieve an reference after it has been stringified (you can if it's still around on the same memory address, and you throw the appropriate XS magic to it - but if it has been garbage collected, or threads have given it a new virtual address, you're out of luck)). In particular, keys will only return the stringified forms of the objects, not the original ones.