Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

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

by hdb (Prior)
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";

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1045281]
help
Chatterbox?
What's the matter? Cat got your tongue?...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (2)
As of 2017-07-28 03:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (424 votes). Check out past polls.