in reply to Re^2: Remove duplicate key value pair in hash
in thread Remove duplicate key value pair in hash

I have modified the example now to remove the confusion. I hope it is clear now.
  • Comment on Re^3: Remove duplicate key value pair in hash

Replies are listed 'Best First'.
Re^4: Remove duplicate key value pair in hash
by Your Mother (Archbishop) on Sep 19, 2014 at 19:40 UTC

    If anything, it’s less clear to me… :P Examine this for a moment before you update or try to clarify–

    perl -MData::Dump=pp -e "pp {aaa=>'bbb', bbb=>'aaa', ccc=>'bbb', bbb=> +'ccc', abc=>'123'}" { aaa => "bbb", abc => 123, bbb => "ccc", ccc => "bbb" }

    Maybe hashes don’t work the way you think? You see the extra bbb key is already “deduplicated.”

    Update: and you silently updated the code in the OP… again. :(