use strict; use warnings; my %hash; $hash{foo} = 42; $hash{foo}{bar} = 23;