in reply to Compare hash !

I assume from your issue, tone and urgency that this is homework. First, please read How do I post a question effectively? and Writeup Formatting Tips. Your lack of proper formatting makes parsing your post and reproducing issues unnecessarily difficult for monks, and frequently dissuades people from helping. It is also generally considered good form to identify homework as such - competence with any technology is only gained after blood and sweat, though we are generally happy to point you in the correct direction.

Your issue is addressed perlfaq4, though not directly. Take a look at How do I sort an array by (anything)?, How do I process an entire hash? and How do I sort a hash (optionally by value instead of key)?. If you review those articles and are still lost, assembled some code(even if it doesn't work correctly) and post again for further guidance.

Replies are listed 'Best First'.
Re^2: Compare hash !
by ikegami (Patriarch) on Nov 18, 2010 at 23:19 UTC
    Sorting is not necessary to find a maximum.
      TIMTOWTDI, and you are literally correct. Given the apparent familiarity of the OP with the subject matter, I was assuming he would benefit more from direction and documentation than from code.

        I took the path that he's in too much of a rush to learn and that he just needed a solution. (He didn't say it was homework and I'm too busy right now to teach.)

        But if you think it's homework and you want to teach him, pointing him to sort without a comment doesn't strike me as wise. Just prompting you to give the right direction and documentation.

        It's got nothing to do with TIMTOWTDI, and all about getting you to explain why you recommend your WTDI when sort isn't required.