Problems? Is your data what you think it is? | |
PerlMonks |
Re: Editing text fileby hbm (Hermit) |
on Jun 18, 2013 at 12:00 UTC ( [id://1039553]=note: print w/replies, xml ) | Need Help?? |
Open the file and a new file. Read the original file line by line. If the line starts with '+', remove the plus and the newline and accumulate it. If the line doesn't start with '+', print any accumulated lines and the current line to the new file.
In Section
Seekers of Perl Wisdom
|
|