Hi,

I am getting back into Perl programming and I would appreciate you help with the following issue. I have a file which contains many lines of text such as:-

THREAD_ID:1bf1d698 CDR_TYPE:AO     SUB_TIME:240815144127   DEL_TIME:240815144127   OA_ADDR:5.0.OTSDC   PRE_TRANS_OA:5.0.OTSDC  DA_ADDR:1.1.966555696176   PRE_TRANS_DA:1.1.966555696176   ORIG_LOCN:10.100.80.7/7220      ORIG_IDNT:OTS A2P       DEST_LOCN:173.209.195.44/8341   DEST_IDNT:Syniverse A2P I_ERR:0.0       PPS_ID: PPS_PROFILE:AO Submission - OA charged  PPS_ERR:1.0     O_ERR:0.0       SILO:   MSG_LEN:22      SEG_NUM:1 of 1  DLV_ATT:0      END_POINT:ESME   FINAL_STATE:DELIVERED   REG_DEL:1 I would like to post process these lines of text such that I have an array of elements which I can later use as I want to output to a result file. The elements (post processed) should look like this :
THREAD_ID:1bf1d698 CDR_TYPE:AO SUB_TIME:240815144127 DEL_TIME:240815144127 OA_ADDR:5.0.OTSDC PRE_TRANS_OA:5.0.OTSDC DA_ADDR:1.1.966555696176 PRE_TRANS_DA:1.1.966555696176 ORIG_LOCN:10.100.80.7/7220 ORIG_IDNT:OTS A2P DEST_LOCN:173.209.195.44/8341 DEST_IDNT:Syniverse A2P I_ERR:0.0 PPS_ID: PPS_PROFILE:AO Submission - OA charged PPS_ERR:1.0 O_ERR:0.0 SILO: MSG_LEN:22 SEG_NUM:1 of 1 DLV_ATT:0 END_POINT:ESME FINAL_STATE:DELIVERED REG_DEL:1
Thanks for your help

In reply to Parsing file in Perl post processing by gbwien

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.