Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: autovivication and referencing

by Amblikai (Sexton)
on Nov 20, 2013 at 13:37 UTC ( #1063523=note: print w/ replies, xml ) Need Help??


in reply to Re: autovivication and referencing
in thread autovivication and referencing

Ah i use Dumper all the time, i just didn't think of it in this case! Thanks! So if i was to "hard code" this complex data structure. Would i have to write it the first way with a separate "other_hash" declaration? Or can i write it somehow similarly to the second way? (The first one is what i want).


Comment on Re^2: autovivication and referencing
Re^3: autovivication and referencing
by hdb (Parson) on Nov 20, 2013 at 13:39 UTC

    No, just say key2 => { ... }, ie use braces instead of parentheses.

    perldsc is your friend, look at HASHES OF HASHES.

      Of Course! Doh!

      Thanks so much!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (16)
As of 2014-08-27 16:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (244 votes), past polls