in reply to beginner question - why is hash key unquoted and in capitals
why is the key CALLBACK in captials
That is purely a stylistic choice. Perl is case sensitive, so a key CALLBACK will point to a different value than callback or Callback. I have a colleague who always uses all caps in his hash keys. I think it's not great to look at, but his code works just fine.
why is the key CALLBACK ... unquoted
If a hash key starts with _ or an alphabetic character and contains only word characters (_, digits and letters), Perl with automatically stringify it for you. This means you do not need to quote hash keys in most cases, though the habit can bite you if you start using whitespace of punctuation. It is documented in Comma Operator in the discussion of the => operator.
|
|---|