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

Re: write to/append a specific line in output file

by pileofrogs (Priest)
on Aug 18, 2011 at 20:40 UTC ( #921072=note: print w/ replies, xml ) Need Help??


in reply to write to/append a specific line in output file

Your idea of putting the different sets into different files and then concatenating them together isn't as bad as you seem to think.

If you're not storing it in ram, you've got to put it on disk somehow, and that seems like the most straight-forward simple solution.

Having said that, what are you doing that requires this strange file format? Often when someone asks a question like this it turns out that there is a better way once we know more about the overall situation. Of course, often it also turns out that you just need a quick fix and you don't want to hash out the whole project, which I totally understand.

--Pileofrogs


Comment on Re: write to/append a specific line in output file
Re^2: write to/append a specific line in output file
by aquinom (Acolyte) on Aug 23, 2011 at 14:52 UTC
    I'm converting genome data to an input format for a software tool called PLINK that takes .ped files which mean an entire genome is on 1 line hence the strange format.
Re^2: write to/append a specific line in output file
by aquinom (Acolyte) on Aug 23, 2011 at 18:48 UTC
    in fact I might still go about doing it that way. Seems like this is re-writing the entire file every time it adds a new piece of data, so this is extremely slow unless you use "deferred writing" in which case it would store everything in memory and I would have gained nothing by using this.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2014-12-29 04:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (184 votes), past polls