Hi, I'm new to this forum. I have a question regarding outputting to .txt file.
while($file =<DNAFILE>)
{
open FILE, ">newseq.txt";
my $dna = fasta($file);
my $newseq = mutationdna($dna,$years);
print FILE $newseq; #this does not work. how do I fix it?
print $newseq; # this work
}
The outputting to newseq.txt file does not work. There are no sequences in the file. However, if i just print of $newseq directly on the screen, I can see the mutated DNA sequence in the terminal.
Howe do I fix this so the mutated new sequence will be outputted to a txt file? Thanks for the help