vsmeruga has asked for the wisdom of the Perl Monks concerning the following question:
Dear perl gurus I need help with a command or script to merge 2 lines where ever we find the string. I am not sure how to attach a scanned document here. First line has string value: VSIN, immediate line has value: SETTLEMENT Where it finds the 2 string values in the whole file, one below the other, those 2 lines to be merged into a single line and the other detail data lines has to be remained in the same order.
Eg: Line1: VSIN .... (Space) SETTLEMENT CURRENCY .... Line2: other detail data in the same order Line3: VJRE ... Line4: VJRE ... Line5: VSIN .... (Space) SETTLEMENT CURRENCY .... Line6: VJRE .... Line7: VJRE .... Line8: VJRE... Line9: VSIN. ...(Space) SETTLEMENT CURRENCY.... .... .... Many thanks Your help is much appreciated as I am not a perl programmer.
Sheku
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Merging 2 lines based on a string
by vinoth.ree (Monsignor) on Feb 05, 2015 at 03:22 UTC | |
by vsmeruga (Acolyte) on Feb 05, 2015 at 09:59 UTC | |
by vsmeruga (Acolyte) on Feb 05, 2015 at 10:02 UTC | |
by Happy-the-monk (Canon) on Feb 05, 2015 at 10:06 UTC | |
by vsmeruga (Acolyte) on Feb 05, 2015 at 12:44 UTC | |
by Corion (Patriarch) on Feb 05, 2015 at 12:58 UTC | |
by vsmeruga (Acolyte) on Feb 05, 2015 at 14:38 UTC |