ron7: As BrowserUk suggests, your OPed code has a problem on the first pass through the loop because you are comparing against $rating, which is uninitialized on that occasion. (I'm not sure how you missed this warning. You did use warnings and strictures, didn't you?) However, initialization to zero will be a problem if a rating can ever be negative (a point on which your OP is silent) and all the ratings happen to be so, in which case you will get a bunch more warnings and also a wrong answer!
In reply to Re: Iterating hash of blessed hashes
by AnomalousMonk
in thread Iterating hash of blessed hashes
by ron7
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |