gbwien has asked for the wisdom of the Perl Monks concerning the following question:
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 :Thanks for your helpTHREAD_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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Parsing file in Perl post processing
by NetWallah (Canon) on Sep 08, 2015 at 22:38 UTC | |
|
Re: Parsing file in Perl post processing
by Laurent_R (Canon) on Sep 09, 2015 at 08:11 UTC | |
|
Re: Parsing file in Perl post processing
by GotToBTru (Prior) on Sep 09, 2015 at 13:31 UTC | |
by NetWallah (Canon) on Sep 09, 2015 at 17:23 UTC | |
by gbwien (Sexton) on Sep 12, 2015 at 22:51 UTC | |
by GotToBTru (Prior) on Sep 13, 2015 at 09:15 UTC | |
by gbwien (Sexton) on Sep 14, 2015 at 14:11 UTC | |
by GotToBTru (Prior) on Sep 14, 2015 at 14:52 UTC | |
| |
|
Re: Parsing file in Perl post processing
by u65 (Chaplain) on Sep 09, 2015 at 10:48 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |