Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

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

by hdb (Monsignor)
on May 13, 2014 at 13:30 UTC ( [id://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'}.

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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1085898]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2024-04-25 19:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found