ASadon has asked for the wisdom of the Perl Monks concerning the following question:
I have an array of hashes in: @recordset_TA_SITE For example: $recordset_TA_SITE[0]{'Age'} contains the age of a site, say 10. Now I want to create a more simple variable with the hash information of record 0. I did:
$site = $recordset_TA_SITE[0];
The result is that values of $site and $recordset_TA_SITE[0] are the same: HASH(0x85449b8)
Now I expect $site{'Age'} to be 10. But it's empty... Why is that?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Assignment of hash to hash doesn't work?
by rnewsham (Curate) on May 13, 2014 at 11:39 UTC | |
|
Re: Assignment of hash to hash doesn't work?
by Monk::Thomas (Friar) on May 13, 2014 at 11:41 UTC | |
|
Re: Assignment of hash to hash doesn't work?
by hdb (Monsignor) on May 13, 2014 at 13:30 UTC | |
by CountZero (Bishop) on May 13, 2014 at 13:49 UTC | |
|
Re: Assignment of hash to hash doesn't work?
by Anonymous Monk on May 13, 2014 at 11:41 UTC |