Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Can a hash key have a scalar value and also contain a hash?

by SuicideJunkie (Vicar)
on Jun 23, 2014 at 22:39 UTC ( [id://1090984]=note: print w/replies, xml ) Need Help??


in reply to Can a hash key have a scalar value and also contain a hash?

Note: Regkey and Regvalue used to maintain a distinction from the hash definition of the terms key and value.

Perhaps you want an extra step, and to have a hash of regkeys=>{...} and regvalues=>{...}. You can't have two regkeys with the same name or two regvalues with the same name, but you can have a regkey and a regvalue with the same name.

{ 'Regkeys' => { HKEY_CURRENT_USER => { 'Regkeys'=>{...}, 'Regvalues'=>{'(default)'=>{type=>REG_SZ, value=>un +def}, ...}, }, HKEY_LOCAL_MACHINE => {...}, }, 'Regvalues' => {'(default)'=>{type=>REG_SZ,value=>undef}, ...}, }

Replies are listed 'Best First'.
Re^2: Can a hash key have a scalar value and also contain a hash?
by bcarroll (Pilgrim) on Jun 23, 2014 at 23:08 UTC

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (3)
As of 2024-04-19 21:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found