Or without references : my %hashIPs; $hashIPs{$ip} = { totalVulns => $ipTotalVulns, vulns => $vulns }; $hashIPs{$ip}{'region'} = $region;