use strict; use Data::Dumper; my $VAR1 = { 'Actions' => [ { 'ID' => '0001', 'Action' => [ { 'Type' => 'Registry', 'Method' => 'CreateKey', 'Key' => 'HKEY_LOCAL_MACHINE\\SOFTWARE' }, { 'Type' => 'Registry', 'Method' => 'CreateKey', 'Key' => 'HKEY_LOCAL_MACHINE\\SOFTWARE' }, ], 'Description' => 'All possible returns of CreateKey.', 'Name' => 'CreateKey' } ] }; $VAR1->{'Actions'}[0]{'Action'}[0]{'Value'} = [ { 'Type' => 'REG_DWORD', 'content' => 'Test1', }, { 'Type' => 'REG_DWORD', 'content' => 'Test2', } ]; print Dumper(\$VAR1);