Great! The output (more of the 2nd one) is what I was looking for. I guess I'll include it in the question next time.

The HoA won't work for me, because in my actual code: in the AoA/AoH, the "inner" array/hash (the references) are 6 strings, not numbers. The "outer" array is the a list of all these "sets" of strings (which come from a search engine type of code and needs to be sorted).

>(How do you indent?)>(which also means I'm going to create a more complex sorting method, where I sort the "outer" array by certain *values* of the hash, or elements by certain elements of the "inner" array).

Should I include this type of background in my questions?

Thanks a lot, I'm going to try and understand these codes.

Thanks for explaining map{@$_}...$_ really screws me up, I take it that one comes from the elements of @all_matches

.

In reply to Re^2: How to (get started on) sort AoA or AoH by frequency by jonc
in thread How to (get started on) sort AoA or AoH by frequency by jonc

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.