open FILE, ">newseq.txt";
The above line must create "newseq.txt". Suppose the end of the process $newseq should 'null' value, at the time newseq.txt will be a blank file. To avoid this kind of circumstance, the file declaration line should be occurred at before the loop.
you will try this below code.
open FILE, ">newseq.txt";
while($file =<DNAFILE>)
{
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
}
k_manimuthu
Junior Poster in Training
93 posts since Jun 2009
Reputation Points: 55
Solved Threads: 24