open $_->[0], $_->[1], $_->[2] for ([\*STDIN, '< input.txt'], [\*STDOUT, '> output.txt']);