#writing the results into an output HTML file. $outputfile = 'html_assignment.html'; open (OUTFILE, ">$outputfile"); print OUTFILE "
##
#start the string from position 0
$revprotein3 = substr($dna,3);
#Translate the DNA to protein
$revprotein3 = dna2peptide($revprotein3);
#Print the sequence in lines of 50 characters long
print "\n\n<----------------Reverse compliment peptide frame 3----------------> \n\n";
print_sequence ($revprotein3,50);
# printing data sequences to HTML
print OUTFILE "
Peptide sequence frame 1
$protein
Peptide sequence frame 2
$protein2
Peptide sequence frame 3
$protein3
Peptide reverse compliment sequence Frame 1
$revprotein
Peptide reverse compliment sequence Frame 2
$revprotein2
Peptide reverse compliment sequence Frame 2
$revprotein3 ";