I have the following hashref of hashrefs structure:
$hashref = {
user1 => {
key1 => "unique_value1",
...
key99 => "value1_99"
},
...
user26 => {
key1 => "unique_value2",
...
key99 => "value1_99"
},
user99 => {
key1 => "unique_value1",
...
key99 => "value99_99"
},
};
What I want out:
$hashref = {
"unique_value1" => ["user1","user99"],
"unique_value2" => ["user26"]
};
I’ve historically built the inverted map on create, but I’m getting lazy.
Any one line sugar I could use for this?
Thank you.
One way: