First split your array elements in order to get an array of arrays (AoA). Something like this (untested)
my @AoA = [split /[,\s]+/, $_] for @array;
Then sort the AoA according to the second element. For a numerical sort, something like this (also untested):
@AoA = sort { $b->[1] <=> $a->[1] } @AoH;
Then you can join the elements of the inner arrays using join or map, I'll leave it to you (you don't give enough details). The whole thing could be done in one single pipeline step, but since you appear to be a beginner, it is probably better to make in in 3 steps as explained above.

In reply to Re: How to sort in perl on the basis of one field. by Laurent_R
in thread How to sort in perl on the basis of one field. by Ankur_kuls

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.