Unix/Linux Go Back    

Make Multile line is one line using window Perl

Shell Programming and Scripting

Kindly Note - This is a Single User Post by Forum Member DGPickett Regarding:
Make Multile line is one line using window Perl.
Please Follow The Primary Link Above to View the Full Discussion.

Old Unix and Linux 12-28-2012   -   Original Discussion by adisky123
DGPickett's Unix or Linux Image
DGPickett DGPickett is offline Forum Advisor  
Registered User
Join Date: Oct 2010
Last Activity: 1 February 2016, 3:35 PM EST
Location: Southern NJ, USA (Nord)
Posts: 4,673
Thanks: 8
Thanked 588 Times in 561 Posts
The linefeeds are inside quotes, so the PERL CSV lib can pick them up, and all you need to do is replace line feed with space inside the fields.

Doing CSV in PERL without using the CSV libs seems like bad form, reinventing the wheel. If there were quoted commas in your fields, this would fall apart, so it is not robust.