use warnings; use strict; use Data::Dumper; my %book = ( 'name' => 'abc', 'author' => 'monk', 'isbn' => '123-890', 'issn' => '@issn', ); my %chapter = ( 'title' => 'xyz', 'page' => '90', ); ## VOIR HERE my @temp_arr = keys %book; @chapter{@temp_arr} = @book{@temp_arr}; print Dumper \%chapter; print $/, $chapter{name},$/; #prints abc