Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: How can I populate attributes of a hash into another ?

by nemesdani (Friar)
on Jul 19, 2013 at 07:03 UTC ( #1045269=note: print w/ replies, xml ) Need Help??


in reply to How can I populate attributes of a hash into another ?

No way. If you add a reference to the %book hash,  print $chapter{name} will still not print what you want. Why do you want to add a book under chapter anyway? Are you sure your data model is good?


I'm too lazy to be proud of being impatient.


Comment on Re: How can I populate attributes of a hash into another ?
Select or Download Code
Re^2: How can I populate attributes of a hash into another ?
by ravi06 (Novice) on Jul 19, 2013 at 07:06 UTC
    Yes. I am sure about the data model.
Re^2: How can I populate attributes of a hash into another ?
by Monk::Thomas (Scribe) on Jul 19, 2013 at 08:15 UTC
    Maybe there is a way. You could create a tied hash which looks up key/values somewhere else if they are not present.

    However that's something I definitely do not recommend at all. This way lies loss of sanity and lots of hairpulling.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2015-07-05 07:13 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 (60 votes), past polls