in reply to Removing linefeeds from part of a file

sorry, this code is untested, but it may just work~

#!/usr/bin/perl -w use strict; my $do_i_chomp?; # off by default while(<>){ # read from STDIN $do_i_chomp? && chomp; # chomp if you should m/^DESCRIPTION$/ && do{ !$do_i_chomp?; # flip chomping on print; # print the DESCRIPTION line }; print; # print the line m/^ENDDESCRIPTION$/ && do{ print "\n$_"; # print newline, then the ENDDESCRIPTION +line !$do_i_chomp?; # flip chomping off }; }
`perl script.pl <infile >outfile`

~Particle