$thing is a hash reference, not an array. See perldata and perlreftut for some more information.
Two ways to extend it:
$thing = { %$thing, 'C' => 'cutie', 'D' => 'pie' }; # OR $thing->{C} = 'cutie'; $thing->{D} = 'pie';
The first one generates a new hash and a new reference to it, the second adds items to the existing hash. Which one you should use depends on your use case (and is only relevant if there are other references to the same hash somewhere).
In reply to Re: Extending Array
by moritz
in thread Extending Array
by VingInMedina
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |