in reply to adding values of element

Try this one-liner:
perl -anF/[\\s,]+/ -e '$tot{$F[0]}+=$F[1]}{print qq|$tot{$_}\t$_\n| fo +r sort keys %tot' <YOUR-FILE-NAME>
Note the extra "\" for the shell (Linux assumed).

        "You're only given one little spark of madness. You mustn't lose it."         - Robin Williams