in reply to Re: Using an element in a Hash of Arrays to access the key (updated x2)
in thread Using an element in a Hash of Arrays to access the key

Thank you. Could you clarify how to set the values I have in my array ("banana", "pear", "apple") into "fruit" using map? Do I need to do a foreach loop for all the values in the array?
  • Comment on Re^2: Using an element in a Hash of Arrays to access the key

Replies are listed 'Best First'.
Re^3: Using an element in a Hash of Arrays to access the key
by haukex (Archbishop) on Mar 25, 2017 at 17:49 UTC
    Could you clarify how to set the values I have in my array ("banana", "pear", "apple") into "fruit" using map?

    I updated my node just after you posted this, if I understand your question correctly, my final example (hash of arrays) should answer this, I hope?