I dropped the idea of using this for my program, but I am intrigued because I never found the answer to how to do this. Basically, if I construct something like the following (Please forgive my formatting if the following doesn’t appear okay):
A = |num_key => hashref_a|,hashref_ais a hash reference toa = |string_keys => hashref_b|,hashref_bis a hash reference tob = |num_key, num_value|.
So as you see, the first level is a hash with keys being numbers and its values are references to another hash, which in turn is a hash whose keys are strings related to values which are again hash references (these are however hashes of just keys and numbers).
Now, how do I access b (the entire list of keys or just the value for a corresponding key) given a num_key for the first hash and a particular string_key for the second hash.
I really hope I was able to communicate the question clearly!
If I’ve understood your request correctly:
Or:
Hmmm…after editing the question, I think you’re asking how to access the values, rather than how to construct them.
It gets a bit iffy here; I’ve used
$num_keybut the only valid value for that given the data is ‘num_key’; similarly with$string_keyand ‘string_keys’. The arrows are the key to the notation, though.