in reply to find unique elments and sum the corresponding values
Quiz: explain all the quotes.map{split;${"''$_[0]'"}+=$_[1]}<DATA>;map{/^'(.*)'$/&&say$1,$",${"''$1 +'"}}%::; __DATA__ AA 12 bb 34 AA 76 cc 98 dd 76 bb 98 __END__ bb 132 dd 76 cc 98 AA 88
|
|---|