Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
use warnings; my %hash1 = ( bush => "A", tree => "A" ); my %hash2 = ( dog => "A", cat => "A" ); my %hash3 = ( plants => \%hash1, animals => \%hash2 ); my %hash4 = ( plants => \%hash1, animals => \%hash2 ); print "$hash3{plants}{bush}\n"; print "$hash4{plants}{bush}\n"; print "\n"; $hash4{plants}{bush}="B"; print "$hash3{plants}{bush}\n"; print "$hash4{plants}{bush}\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Initial Hash of Hash by value
by wind (Priest) on Apr 07, 2011 at 18:25 UTC | |
|
Re: Initial Hash of Hash by value
by FunkyMonk (Bishop) on Apr 07, 2011 at 18:30 UTC | |
|
Re: Initial Hash of Hash by value
by believer (Sexton) on Apr 11, 2011 at 13:06 UTC |