Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Editing text file

by hbm (Hermit)
on Jun 18, 2013 at 12:00 UTC ( [id://1039553]=note: print w/replies, xml ) Need Help??


in reply to Editing text file

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.

Replies are listed 'Best First'.
Re^2: Editing text file
by choroba (Cardinal) on Jun 18, 2013 at 12:24 UTC
    No need to accumulate. You can print every line, having possibly removed the newline and the + if needed.
    لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1039553]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (1)
As of 2024-04-16 15:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found