Say I have a hash of a hash, defined as below:
%OUTER = (
OUT1 => {
IN1 => "I1",
IN2 => "I2",
},
OUT2 => {
IN1 => "I1",
IN2 => "I3",
},
);
How can I obtain all the OUTER hash values that have IN1 = "I1"? Of course, I know you can simply loop thru all the outer keys and compare the IN1's...but, that seems pretty inefficient and was hoping there was a better way.
Thanks in advance!
%OUTER = (
OUT1 => {
IN1 => "I1",
IN2 => "I2",
},
OUT2 => {
IN1 => "I1",
IN2 => "I3",
},
);
How can I obtain all the OUTER hash values that have IN1 = "I1"? Of course, I know you can simply loop thru all the outer keys and compare the IN1's...but, that seems pretty inefficient and was hoping there was a better way.
Thanks in advance!