Karim has asked for the wisdom of the Perl Monks concerning the following question:
Dear All,
I hope this is the right place to ask a newbie question! Apologies if I'm mistaken.
I am faced with a seemingly trivial problem. How to remove newline characters in the middle of a column and keep the new line(and potential carriage return) at the end of my record?
After many attempts at using perl regexes, I am still stuck! Here is a sample file: 4 columns, 2 rows, delim=';'
Input:
cofathec-korb.be;MX;mailbackup.ops.be;3600 cofathec-korb.be;MX;"mx1.energy-services.be address1 address2;3600
Desired output:
cofathec-korb.be;MX;mailbackup.ops.be;3600 cofathec-korb.be;MX;"mx1.energy-services.be address1 address2;3600
Any help would be hugely appreciated.
Cheers
Karim
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: delimited file with multiline columns.
by haukex (Archbishop) on Dec 20, 2016 at 11:24 UTC | |
|
Re: delimited file with multiline columns.
by kcott (Archbishop) on Dec 21, 2016 at 07:03 UTC | |
|
Re: delimited file with multiline columns.
by soonix (Chancellor) on Dec 26, 2016 at 08:17 UTC |