(* Collection of code snippets by Arne Vajhøj *)
(* (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) *)
program copy(input,output);

var
   f1, f2 : text;
   line : varying [255] of char;

begin
   open(f1, 'z1.txt', old);
   reset(f1);
   open(f2, 'z2.txt', new);
   rewrite(f2);
   while not(eof(f1)) do begin
      readln(f1, line);
      writeln(f2, line);
   end;
   close(f2);
   close(f1);
end.
