my %hash = ( 'A1' => { 'B1' => 'Value', 'B2' => { 'C1' => [arrayitem1, arrayitem2, arrayitem3,], 'C2' => [arrayitem1, arrayitem2, arrayitem3,], } }, ) #### if (exists $hash{'A1'}{'B2'}{'C1'}) { push ( @{ $hash{'A1'}{'B2'}{'C1'}}, arrayitem4; } else { $hash{'A1'}{'B2'} = {'C1' => [arrayitem1]}; }