my $max = {}; $max->{george}->{money} = 100; $max->{george}->{budget} = 100; my $person = "lindsay"; $max->{$person}->{money} = 1500; $max->{$person}->{budget} = 2000; for ("george","lindsay") { print "$_ 's money= " . $max->{$_}->{money} . "\n"; }