Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Assignment of hash to hash doesn't work?

by hdb (Prior)
on May 13, 2014 at 13:30 UTC ( #1085898=note: print w/ replies, xml ) Need Help??


in reply to Assignment of hash to hash doesn't work?

In addition to what the fellow brothers said above, $recordset_TA_SITE[0]{'Age'} only works because Perl is secretly interpreting it as $recordset_TA_SITE[0]->{'Age'}. This happens only for nested structures (more precisely: from the second level onwards) and therefore $site{'Age'} is not automatically interpreted as $site->{'Age'}.


Comment on Re: Assignment of hash to hash doesn't work?
Select or Download Code
Replies are listed 'Best First'.
Re^2: Assignment of hash to hash doesn't work?
by CountZero (Bishop) on May 13, 2014 at 13:49 UTC
    Or more easy to remember: Perl assumes a '->' between closing and opening square and curly brackets.

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

    My blog: Imperial Deltronics

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1085898]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (16)
As of 2015-07-28 15:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (257 votes), past polls