Exercise 4.4 D

From Earlham Cluster Department

Jump to: navigation, search

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;

Personal tools
Namespaces
Variants
Actions
websites
wiki
this semester
Toolbox