- or download this
$hash{ 'key1' }{ 'key2' }
- or download this
$hash{ 'key1' } = 'foo';
$hash{ 'key1' }{ 'key2' } = 'bar'; # (2)
# (2) means find %(current pkg)::foo and do
$(current pkg)::foo{ 'key2' } = 'bar';
- or download this
my %hash;
$hash{ 'key1' } = {}; ## ref to hash
...
key2 => 'foo'
}
);
- or download this
$hash{ 'key1' } = 'foo';
$hash{ 'key1', 'key2' } = 'bar';
- or download this
my %hash = (
...
my $food = $hash{ 'food' };
print "$food->{ 'color' } $food->{ 'name' }\n";