in reply to Pseudo-hashes deprecated
It's fairly simple. What you are trying to there is use a pseudo-hash. Pseudo-hashes are deprecated and should not be used. Simple. Possibly whatever code you are copying from was written before pseudo hashes were deprecated.
(Pseudo hashes are when you create an array with the first element being a hash ref and attempt to use the array as both an array an a hash, as you attempt to do).