http://www.perlmonks.org?node_id=95881


in reply to Removing linefeeds from part of a file

{ local $\ = "\n"; while (<>) { chomp; if (/^ENDDESCRIPTION$/) { print "\n"; $\ = "\n"; } print; $\ = "" if /^DESCRIPTION$/; } }

-- Abigail