#!/usr/bin/perl -w
# Calculating the reverse complement of a strand of DNA

# The DNA
$DNA = 'ACGGGAGGACGGGAAAATTACTACGGCATTAGC';

# Print the DNA onto the screen
print "Here is the starting DNA:\n\n";

print "$DNA\n\n";

# Make a new (reverse) copy of the DNA
$revcom = reverse $DNA;

print "Reverse copy of DNA:\n\n$revcom\n\n";

# Translate A->T, C->G, G->C, T->A, s/// won't work!
$revcom =~ tr/ACGT/TGCA/;

# Print the reverse complement DNA onto the screen
print "Here is the reverse complement DNA:\n\n$revcom\n";

exit;
