Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

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

by hdb (Parson)
on Jul 19, 2013 at 07:34 UTC ( #1045281=note: print w/ replies, xml ) Need Help??


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

The closest I can think of is this:

use strict; use warnings; my %book = ( 'name' => 'abc', 'author' => 'monk', 'isbn' => '123-890', 'issn' => '@issn', ); my %chapter = ( 'title' => 'xyz', 'page' => '90', ); $chapter{book} = \%book; print $chapter{book}{name},"\n";


Comment on Re: How can I populate attributes of a hash into another ?
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (16)
As of 2014-07-23 16:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (147 votes), past polls