File input/output: Difference between revisions
Content added Content deleted
No edit summary |
No edit summary |
||
Line 11: | Line 11: | ||
print OUTPUT $_; |
print OUTPUT $_; |
||
} |
} |
||
{{task}} |
Revision as of 22:44, 9 January 2007
In this task, the job is to create a file called "output.txt", and place in it the contents of the file "input.txt".
Perl
Interpreter: Perl 5.8.8
#!/usr/bin/perl -w open INPUT, "<input.txt"; open OUTPUT, ">output.txt"; while ( <INPUT> ) { print OUTPUT $_; }
![Task](http://static.miraheze.org/rosettacodewiki/thumb/b/ba/Rcode-button-task-crushed.png/64px-Rcode-button-task-crushed.png)
You are encouraged to solve this task according to the task description, using any language you may know.