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


in reply to Hash of Hashes not filling - only using last line of file

use strict; use warnings; use 5.012; my %hash; %hash = ('a' => 10); %hash = ('b' => 20); use Data::Dumper; say Dumper(\%hash); --output:-- $VAR1 = { 'b' => 20 };
Compare to:

use strict; use warnings; use 5.012; my %hash; $hash{a} = 10; $hash{b} = 20; use Data::Dumper; say Dumper(\%hash); --output:-- $VAR1 = { 'a' => 10, 'b' => 20 };
The real values I used instead of 'a' and 'b' are proprietary information, but hopefully you get the idea.