http://www.perlmonks.org?node_id=1015794

chinaxing has asked for the wisdom of the Perl Monks concerning the following question:

I have two configure file defined by perl hash:
#file1: read as $conf_file1 { db => { name => 'pdte', host => 'localhost', } } #file2: read as $conf_file2 { db => { port => '5432', user => 'pdte_usr', password => 'pdte_213456', } } my $new_conf = { %$conf_file1, %conf_file2 }

but this type of merge can only merge hash level1, cannot merge higher than level1.

How can i complete this merge in perl ?