#!perl -w use strict; # Transcribing DNA into RNA # The DNA my $DNA = 'ACGGGAGGACGGGAAAATTACTACGGCATTAGC'; # Print the DNA onto the screen print "Here is the starting DNA:\n"; print_dna($DNA); # Print the RNA onto the screen print "Result of transcribing the DNA to RNA:\n"; print_dna(dna2rna($DNA)); # Successful Exit exit 0; # Transcribe the DNA to RNA by substituting all T's with U's. sub dna2rna { my $rna = shift; $rna =~ s/T/U/g; return $rna; } # sub to print the DNA onto the screen sub print_dna { my $dna = shift; print $dna,"\n"; }