in reply to Add values to a referenced HoH

It looks like you want to assign to a slice of the hash-ref. That will take care of assigning the scalars to key1 and key3. For the array, you can use push. This should work:

@{$hash_ref}{qw(key1 key3)} = ( "new value1", "add value3" ); push @{$hash_ref->{ary1}}, { ary_key21 => "ary_value21", ary_key22 => "ary_value22", };