in reply to Removing linefeeds from part of a file
{ local $\ = "\n"; while (<>) { chomp; if (/^ENDDESCRIPTION$/) { print "\n"; $\ = "\n"; } print; $\ = "" if /^DESCRIPTION$/; } }
-- Abigail
In Section
Seekers of Perl Wisdom
in reply to Removing linefeeds from part of a file
{ local $\ = "\n"; while (<>) { chomp; if (/^ENDDESCRIPTION$/) { print "\n"; $\ = "\n"; } print; $\ = "" if /^DESCRIPTION$/; } }
-- Abigail