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

Thank you, this worked. Could you clarify what the purpose of  // [] is in  print "banana -> @{ $reverse{'banana'} // [] }\n";?

Replies are listed 'Best First'.
Re^3: Using an element in a Hash of Arrays to access the key
by tybalt89 (Monsignor) on Mar 25, 2017 at 17:48 UTC

    That is there to handle the case when the element you are trying to look up does not exist.
    Try looking up 'peach' with and without that part of the code.