in reply to Slicing a HoAoH

The array you're splicing into has a hash reference as the second element, and you're replacing it with two other references.

It seems you want to copy the contents out before splicing in the references, so that you're referring to anonymous entries:

splice @{$types{TYPE1}}, 1, 1, ({%{$types{'TYPE2'}[0]}},{%{$types{'TYP +E2'}[1]}});
or
splice @{$types{TYPE1}}, 1, 1, map {{%$_}} @{$types{'TYPE2'}};

The PerlMonk tr/// Advocate