Open input file with "<" not ">>"

parent 02693c37
...@@ -176,7 +176,7 @@ sub mtr_appendfile_to_file ($$) { ...@@ -176,7 +176,7 @@ sub mtr_appendfile_to_file ($$) {
my $to_file= shift; my $to_file= shift;
open(TOFILE,">>",$to_file) or mtr_error("can't open file \"$to_file\": $!"); open(TOFILE,">>",$to_file) or mtr_error("can't open file \"$to_file\": $!");
open(FROMFILE,">>",$from_file) open(FROMFILE,"<",$from_file)
or mtr_error("can't open file \"$from_file\": $!"); or mtr_error("can't open file \"$from_file\": $!");
print TOFILE while (<FROMFILE>); print TOFILE while (<FROMFILE>);
close FROMFILE; close FROMFILE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment