File input/output: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 172:
#!/usr/bin/perl -w
open INPUT, "<input.txt" or die "Can't open input.txt for reading, $!";
open OUTPUT, ">output.txt" or die "Can't open output.txt for writing, $!";
while ( <INPUT> ) {
print OUTPUT $_;
}
 
close (OUTPUT);
close (INPUT);
 
==[[PHP]]==
Anonymous user