- or download this
$hash{a}{drinks}=1;
$hash{b}{drinks}=2;
- or download this
+-------+ +----------+ +-----------+ +-------------+
| %hash | +-->| Anon Ref | +->| Anon hash | +->| Anon scalar |
...
+----------+ | +-----------+ | +-------------+
| addr ----+ | drinks ----+ | 2 |
+----------+ +-----------+ +-------------+
- or download this
>perl -e"$h{a}{d}=1; $h{b}{d}=2; print qq{$_: $h{$_}\n} for keys %h;"
a: HASH(0x22534c)
b: HASH(0x2253a0)
- or download this
+-------+ +----------+ +-----------+ +-------------+
| %hash | +-->| Anon Ref | +----->| Anon hash | +->| Anon scalar |
...
+----------+ |
| addr --------+
+----------+
- or download this
+-------+ +----------+ +-----------+ +-------------+
| %hash | +-->| Anon Ref | +->| Anon hash | +->| Anon scalar |
...
+----------+ | +-----------+ | +-------------+
| addr ----+ | drinks ----+ | 2 |
+----------+ +-----------+ +-------------+