in reply to Reading a text file collapsing line continuations
If all you care about is printing it out, you don't have to accumulate the lines before printing. Just print out the partial lines (without line endings).
If the input to your existing code may be broken up in multiple lines via backslash \, just filter the input first before it gets sucked in by your existing code:
If the input to your existing code may be broken up in multiple lines via backslash \, just filter the input first before it gets sucked in by your existing code:
perl -pe 's=\s*\\\s*$/= ='
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Reading a text file collapsing line continuations
by skx (Parson) on Mar 09, 2009 at 17:57 UTC | |
by repellent (Priest) on Mar 09, 2009 at 19:06 UTC |
In Section
Seekers of Perl Wisdom