in reply to Adding an new element to array.

Adding an new element to array
Just so you know, this is not an array. It is a hash.

Worse, it is a reference to a hash, not a directly specified hash the way most people start using them.

Looks like others are giving guidance on how you might update that hash, so I won't replicate that information here. But nobody seems to have mentioned that you appear to be starting from a faulty assumption: You do not have an array in the usual Perl sense of the word.