#open data file if (open(DNAInputFile, 'DNA_seq.txt')) { print "File DNA_seq.txt opened OK \n"; } else { print "Cannot open file DNA_seq.txt\n"; exit; } #read from file, store as array @ for array variable @DNA_array = ; close DNAInputFile; #close the input file $RNA = join('',@DNA_array); #convert array of chars to string print "Here is the starting DNA sequence: \n".$RNA,"\n"; $RNA =~ s/T/U/g; print "Here is the result of transcribing the DNA to RNA: \n"; print "$RNA\n"; $x = $RNA; print "Here are the codons (3 bases each)\n"; for ($i=0; $i< length $x; $i=$i+3) { $subSeq = substr($x, $i, 3); print "$subSeq\n"; } exit;