in reply to Suggestions for optimizing this code...

Do you need random access to the lines or are you just going to iterate over the array once from beginning to end?


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^2: Suggestions for optimizing this code...
by NeilF (Sexton) on Jan 17, 2006 at 11:26 UTC
    I do need that array... Maybe what I'll do is read buffered, but write using syswrite. All I'd have to do then is replace:-

    open DF,">test.txt"; print DF @test; close DF;


    with:-

    sysopen(DF,"test.txt", O_WRONLY | O_CREAT); syswrite DF,join('', @test); close DF;


    At least then the IO Processes for writing are down to 1!