Exercise 4.4 D
Revision as of 11:24, 18 December 2009 by Damian (talk | contribs) (New page: Return to Aug 30-Sept 5 <pre> #!/usr/bin/perl -w use strict; #Damian Almiron #Ex 4-4 # Repeat Ex 4-3, but use the string directives \U and \L #The DNA variables (upper and lo...)
Return to Aug 30-Sept 5
#!/usr/bin/perl -w use strict; #Damian Almiron #Ex 4-4 # Repeat Ex 4-3, but use the string directives \U and \L #The DNA variables (upper and lower case) my $DNA1 = 'ACTGACTGACTGACTACTGACTGACTGACTG'; my $DNA2 = 'actgactgactgactgactgactgactgactgactg'; #Print the DNAs print "Here are our original DNA sequences in upper and lower case:\n\n"; print "DNAuppercase:$DNA1.\n\n"; print "DNAlowercase:$DNA2.\n\n"; #Make copies my $DNAU1 = $DNA1; my $DNAU2 = $DNA2; my $DNAL1 = $DNA1; my $DNAL2 = $DNA2; #Print the DNAs in lowercase print "The DNAs in uppercase:.\n\n"; print “DNA1:\U$DNAU1.\n\n”; print “DNA2:\U$DNAU2.\n\n”; #Print the DNAs in uppercase print "The DNAs in lowercase:.\n\n"; print “DNA1:\L$DNAL1.\n\n”; print “DNA2:\L$DNAL2.\n\n”; #THE END exit;