in reply to Can a hash key have a scalar value and also contain a hash?
"but I don't think it is possible to assign a value to a key that has subkeys under it (hash of hashes), in this case isn't the hash of the subkeys the value?"
Indeed. Each key/value pair in a hash maps precisely one key to precisely one value; so it can't be both a scalar and a hash reference at the same time, though you're of course right that you could use an array there as an extra layer of indirection.
Searching CPAN immediately reveals Win32::Registry::File, and the much newer Parse::Win32Registry. Have you looked at those?
|
|---|
| 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 22:56 UTC |