in reply to (another) HoH question
use Data::Dumper; my %hash; $hash{tree} = 4; $hash{tree}->{apple} = 6; print Dumper \%hash;
Run that. When you understand why "4" does not appear in the output, then you will find enlightenment.
Update: d'oh! "6" doesn't appear in the output. In my defence, the above code was typed on a mobile device where I didn't have a copy of Perl to test it. A flimsy defence, I admit.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: (another) HoH question
by muba (Priest) on Jun 23, 2012 at 18:33 UTC |