in reply to Suggestions for optimizing this code...

open DF, 'test.txt'; #open for reading my @test=<DF>; #$test[0] - first string, $test[1] - second.. close DF; #clear # Do some work on @test Work... Work... Work... open (DF,'>test.txt');#open for writing print DF @test;#flush array into file close DF;#clear

Replies are listed 'Best First'.
Re^2: Suggestions for optimizing this code...
by NeilF (Sexton) on Jan 17, 2006 at 09:54 UTC
    Unfortunately (as mentioned in my original post) I have to use sysread & syswrite. These only basically generate one IO process. In the case of say a one meg file reading and writing using buffered IO will use 2000 IO process each way...