So I would probably try to first process these two last fields with a regular expression, something like:SEG_NUM:1 of 1 DLV_ATT:0 END_POINT:ESME FINAL_STATE:DELIVERED REG_DEL:1
remove them from the string and then use something like split /\s+/ on the rest of the string, and finally to reassemble the array in the proper order.@endfields = /(SEG_NUM.+?)\s+(END_POINT.+?)/;
Update: I did not originally noticed, but it appears that at least two other fields have embedded spaces:
So splitting on spaces becomes harder to use, at least for about the last half of the original string. Although I don't like the idea too much, perhaps a long regex with each field key is the only solution, at least for the eight fields or so.DEST_IDNT:Syniverse A2P I_ERR:0.0 PPS_ID: PPS_PROFILE:AO Submission - OA charged
In reply to Re: Parsing file in Perl post processing
by Laurent_R
in thread Parsing file in Perl post processing
by gbwien
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |