I need help rather urgently... I have a file that looks like this but has much more of last 2 lines (between 20 and 80 lines per "group" and repeats like 80 times (see below...) and want it splitted and formatted with 1 tab between each part (but there are names that should be preserved tho..)
GREN: 1 200m FRISIM HERRAR SENIORER PASS 1 10.00 REKORD: V€RLDS EUROPA NORDISKT SVENSKT SENIOR: 1:44.06 1:44.89 1:46.76 1:46.76 JUNIOR: 1:50.70 NR IDNR NAMN F…DD KOD F…RENING ANM.TID 1. 277 Jonas Persson 83 2504 MKK 1:48.26 2. 585 Petter Stymne 83 0297 SK NEPTUN 1:48.32 3. 583 Peter Edvardsson 81 3500 SK NEPTUN 1:48.46
I't would be nice to extract "GREN: 1 ..." to file name (but not a necissity(<- thats just plain wrong :P ) ) and the repeating part in the files... should say that there a fields that might be empty also... Can any one give me a hint?
--- Gosh darn...

In reply to splitting and formatting my big textfile... by samuelt

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.