open DF, 'test.txt'; #open for reading my @test=; #$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