RosettaCodeData/Task/File-input-output/Zkl/file-input-output-2.zkl

4 lines
170 B
Plaintext

var in=File("input.txt"), out=File("output.txt","w");
foreach line in (in) { out.write(line) } // copy line by line
out.close(); // or out=Void and let GC close the file