in reply to Hash key string restrictions?

The only rule is that hash keys are always strings while normal perl scalars can be a number of types; strings, references, objects (blessed references), integers and floats.

That means you can for example use objects as keys but you cannot get an object out of a key; instead you will get the "stringified" version of the object - and the hash won't see the difference between a stringified object and the object itself.

There is also the subtle issue that the taint flag isn't kept for hash keys; in other words if you use a tainted value as a hash key and then read the key, the new value will be untainted.

The best way to think about this is that hash keys are always "pure" strings with no additional data whatsoever.

None of this applies to hash values by the way. They're regular old perl scalars.