Do you receive the Programmer's Heaven newsletter? If not, why not subscribe?

Perl

Moderators: Jonathan
Number of threads: 1189
Number of posts: 3526

This Forum Only
Post New Thread

Report
Perl Script Help - Caraige return elimination Posted by ssk1974 on 5 Nov 2009 at 2:05 PM
I have a file like below

BUFFALO||14-SEP-09
BUFFALO||20-O
CT-09

BUFFALO||31-JUL-09

Line #1 and Line # 5 are correct.
Line # 4 has jsut a carraige return and that needs to be removed.
Line # 2 the date field has been broken with a carraige return and it has splilled into Line # 3. They both have to be combined.

Can you please help me with a perl script/logic to fix these two issues.

Thank you.




 
Popular resources and forums for programmers on Programmersheaven.com
Assembly, Basic, C, C#, C++, Delphi, Java, JavaScript, Pascal, Perl, PHP, Python, Ruby, Visual Basic
© Copyright 2009 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Publisher: Lars Hagelin. Read the latest words from the publisher here.
Be the first to sign up for Lars Hagelin’s In-depth Outsourcing Newsletter here.
bootstrapLabs Logo A bootstrapLabs project.