My first time posting something here.

I am facing a little problem. I have made some codes that assembles data from different files into an output files. Problem is i want to write another code that can being the data in this output file in a sequence w.r.t. to a field.
for instance my data looks like


......
2.225:0:1248266065752:Y:282
2.232:0:1248266069770:Y:500
2.225:1:1248266072861:Y:438
2.232:1:1248266075785:Y:328
2.225:1:1248266081283:Y:297
2.232:1:1248266082035:Y:328
2.232:1:1248266087410:Y:281
2.225:1:1248266088768:Y:296
2.232:1:1248266091426:Y:281
....

what i would want is keeping the first field in mind; I would want the lines belonging to the ID 2.225 in sequence ... and when finished; it will be followed by the field 2.232 ... and so on ... In short i want to sort then according to the first field which you can say its the ID ...

I had some ideas for them but am afraid am not able to succeed with them; can anyone out there provide me a effective solution ... (: i would be so grateful!!

In reply to a little problem with sorting my data by aash08

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.