Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Answer: How do I handle mid-line carriage returns in a flatfile database?

( #48959=categorized answer: print w/ replies, xml ) Need Help??

Q&A > regular expressions > How do I handle mid-line carriage returns in a flatfile database? contributed by extremely

The best way is to stop using return to end database records. =) Set $/="\033\n"; and write records with that on the end of the record. Using a 2 char line terminator lets you have a nice return at the end for eyeballing the files and use a nasty binary character to make the end-of-line special versus your data.

Comment on Answer: How do I handle mid-line carriage returns in a flatfile database?
Download Code
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (9)
As of 2015-07-06 08:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (70 votes), past polls