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

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