Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: Reading a text file collapsing line continuations

by CountZero (Bishop)
on Mar 09, 2009 at 16:27 UTC ( #749338=note: print w/ replies, xml ) Need Help??


in reply to Re: Reading a text file collapsing line continuations
in thread Reading a text file collapsing line continuations

If you have a really huge file, your solution needs a lot of memory.

Furthermore you will still need to loop over all the data to re-assemble the broken lines, so your code will not be much simpler.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James


Comment on Re^2: Reading a text file collapsing line continuations
Re^3: Reading a text file collapsing line continuations
by Bloodnok (Vicar) on Mar 09, 2009 at 16:53 UTC
    Obviously, my intentions weren't as clear as they obviously could have been - my proposal was to maintain the broken line processing, merely accumulating assimilated lines into an array which ....... Oh bugger!! your point hoves quite clearly into view - just off to see if there's a cure for the write before you think malady - with which I have, self-evidently, been stricken.

    A user level that continues to overstate my experience :-))

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (9)
As of 2014-09-02 08:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (20 votes), past polls