hi monks,
i have the following list of filenames

{ID#0000D128}-20060519_090519_00000ZURACF2954.zip
{ID#0000D129}-20060519_091438_00000ZURACF2955.zip
{ID#0000D12C}-20060519_092458_00000ZURACF2957.zip
{ID#0000D12D}-20060519_092911_00000ZURACF2956.zip

My problem is that i need to sort this list so that at the end the numbers are in right order, as you can see the 56 is after the 57 it shoud be the other way around

i ve read in a book that there are more complex sort functions but then the book stops at this position and continue with the a cmp b and the nummeric way a <=> b

i thought about spliting the filename into parts to sort everything as a part and then reatach the parts but when i do somthing like this i lost the connection between the parts


have someone a clue about this ?, as usual links tips and any help are kindly welcome ;)


In reply to problems with advanced array sort by ultibuzz

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.