Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Re: Re: Adding additional values to a hash of an hash ?

by djantzen (Priest)
on Nov 12, 2002 at 20:21 UTC ( [id://212393]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Adding additional values to a hash of an hash ?
in thread Adding additional values to a hash of an hash ?

What you're talking about then is a hash of arrays of hashes. $data{$formname} now returns a reference to the array, and to access an individual hash table in the array you can say something like: $data{$formname}->[0]{type}. Basically, what you're doing is a hash lookup to grab the array reference pointed to by $formname, then using an array index to obtain a reference to the nested hash whose data you need to access, and then doing a normal hash lookup there on 'type'.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (2)
As of 2024-04-25 23:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found