When comparing strings, use eq, not ==. Using the latter will convert the strings into numbers before comparing them.
The proper syntax for if is if (...) { ... }. The parens are missing in your code.
Update: The OP updated his node to include sample data. It seems he is still storing the score (a number he wishes to change) as the key to the hash. He was told this was a bad idea, and he was given several solutions to his question in an earlier post.
In reply to Re: Counting instances in a hash from an array
by ikegami
in thread Counting instances in a hash from an array
by Gavin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |