use Data::Dumper; my %hash1 = ( key1 => 'hello', key2 => 'world' ); my %hash2 = %hash1; print Dumper \%hash1; print Dumper \%hash2;