Your post title is "Comment on" so I will.

First off "Comment on" is a bad title if you want to attract people to your question. It tells them nothing about the topic of your question and looks like a lazy newbie question so anyone with only a small amount of time is likely to skip over it. You have immediately filtered out some of the people most likely to be able to help you. Is that what you want? It sure doesn't help get good answers!

The 'code' you posted is rubbish, or at least it is rubbish if intended to be Perl. We always consider the syntax. If you are too lazy to provide a decent code sample that we can work with you just filtered out another large percentage of the people who might otherwise have given you good answers.

You say "output should be say", but you don't show us the code you are using to generate the output. How can we have any idea what you are actually trying to achieve? Your example data is obviously invented and doesn't tell us anything about your actual problem domain. Want to guess how many more possible replies you just lost?

Your final question doesn't have anything to do with any of the preceding material. If you fixed the syntax for your sample 'code' then you have the answer right there! Ain't many people going to bother replying to that.

So, I suggest:

  1. you use a good title for your question that will attract people with and interest and knowledge pertinent to your problem,
  2. you provide a good code sample that compiles and that we can run to reproduce the problem you have,
  3. you provide a description of why you want to solve the problem and how the code you have shown fails
  4. you provide a very small amount of input data if appropriate,
  5. you provide a sample of expected output data if appropriate,
  6. you provide a sample of actual output showing the error if appropriate,
  7. that you do the work to write a good node because that is actually the lazy option in the long run!
True laziness is hard work

In reply to Re: to sort hash wrt values corresponding to keys by GrandFather
in thread to sort hash wrt values corresponding to keys by ansh batra

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.