I created better example to show. string [] myarr = ["foo", "bar", "baz"]; myarr ~= "new"; File file = File(`result.txt`, "w"); file.write(myarr); is any way to write myarr to file in byLine mode