File content after first write %HoH = ( 'LOCKS' => { 'SCRIPT' => { 'script1' => { 'params' => [ 'a', 'b', 'c' ], 'shell' => '/bin/bash' }, 'script2' => { 'params' => [ '-v' ] } } } ); -------------------------------------------------- New hash as read in from file %HoH1 = ( 'LOCKS' => { 'SCRIPT' => { 'script1' => { 'params' => [ 'a', 'b', 'c' ], 'shell' => '/bin/bash' }, 'script2' => { 'params' => [ '-v' ] } } } ); -------------------------------------------------- File content after key delete and second write %HoH = ( 'LOCKS' => { 'SCRIPT' => { 'script1' => { 'params' => [ 'a', 'b', 'c' ], 'shell' => '/bin/bash' } } } ); -------------------------------------------------- Second new hash read in from modified file %HoH2 = ( 'LOCKS' => { 'SCRIPT' => { 'script1' => { 'params' => [ 'a', 'b', 'c' ], 'shell' => '/bin/bash' } } } );