Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

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

by hdb (Parson)
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
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 romping around the Monastery: (12)
As of 2014-08-29 15:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (281 votes), past polls