in reply to Re: Double blank lines to single blank line
in thread Double blank lines to single blank line

A bit too deep into data massaging on this set of data to go back to original code. Good point though. I think I can fix the original code but I need to know what to do to work with the existing set with the double blank lines. There must be a script or a way to do this in word etc quickly.
  • Comment on Re^2: Double blank lines to single blank line

Replies are listed 'Best First'.
Re^3: Double blank lines to single blank line
by GrandFather (Saint) on May 11, 2007 at 00:04 UTC

    Something like:

    use strict; use warnings; my $run = 1; while (<DATA>) { next if $run && m/^\n/; print; $run = m/^\n/; } __DATA__ data as per sample

    with i/o adjusted for your requirements should do what you need to clean up multiple line breaks.


    DWIM is Perl's answer to Gödel