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 2teez (Vicar)
on Jun 23, 2014 at 22:36 UTC ( [id://1090983]=note: print w/replies, xml ) Need Help??


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

Hi bcarroll,

I must confess I didn't get what you wanted done properly, but am sure what you are trying to do is not Impossible if properly expressed with a likely show of how the expected output is suppose to look like.
That been said, while you want to show that, you can also look at this documentation perldsc.

If you tell me, I'll forget.
If you show me, I'll remember.
if you involve me, I'll understand.
--- Author unknown to me
  • Comment on Re: Can a hash key have a scalar value and also contain a hash?

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:04 UTC
    Here is an example of the result I was dreaming of (given the example data):
    my $registry = loadreg('file.reg'); print $registry->{'SessionServer/NamespaceProviders'}; # would print 3 +2225 print $registry->{'SessionServer/NamespaceProviders'}{'ODBC'}; # would + print ssprovider_db print $registry->{'SessionServer/NamespaceProviders'}{'ODBC'}{'TYPE'}; + # would print REG_SZ

Log In?
Username:
Password:

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

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

    No recent polls found