| | Hand waving.... | | # be sure to close the files before re-opening them if they have been opened in the script # prior to this point open(F1,"> file1.txt") or die "file1.txt: $!"; open(F2,"< file2.txt") or die "file2.txt: $1"; | | More hand waving.... $line=; # read a line from file2.txt print F1 $line; #write that line to file1.txt