in reply to Removing double carriage return
while (<>) { s/\n\n/\n/gs; print; }
or something like this...while (<>) { next if $_ =~ m/\n{1}/; if ($_ =~ m/\n{2}){s/\n{2}/\n/gs} elsif ($_ =~ m/\n{3,}){s/\n{3,}/\n\s/gs} }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Removing double carriage return
by Anonymous Monk on Aug 20, 2011 at 01:48 UTC | |
by i5513 (Pilgrim) on Aug 20, 2011 at 08:44 UTC | |
by Anonymous Monk on Aug 21, 2011 at 06:21 UTC | |
|
Re^2: Removing double carriage return
by dragooneye (Novice) on Aug 22, 2011 at 18:21 UTC | |
|
Re^2: Removing double carriage return
by dragooneye (Novice) on Aug 22, 2011 at 18:35 UTC | |
by Cristoforo (Curate) on Aug 23, 2011 at 04:58 UTC | |
by dragooneye (Novice) on Aug 26, 2011 at 17:29 UTC | |
by pvaldes (Chaplain) on Aug 22, 2011 at 20:31 UTC |