If anyone had the official "lex" specification for hash
keys, it would be very enlightening. A "valid" string
is probably a broader definition then my very conservative
"safe" string specification.
Update:
I am implying that this would be found in the Perl source
code (in a .lex file, perhaps?)
You could look in the Perl source code. Testing whether a bareword is not a warning/error is probably not in the grammar, though, but in logic applied later.