title: Why isn't Perl's tr/// doing what I want?
body: <p>I am using Perl for a script that takes in input as two short strings of DNA. As an output, I concatenate the two strings strings then print the second string lined up over its copy at the end of the concatenated string. For example: if input string are AAAA and TTTTT then print:</p>
  
  <pre><code>AAAAATTTTT
       TTTTT
  </code></pre>
  
  <p>I know there are other ways to do this but I am curious to know why my use of tr/// isn't working.</p>
  
  <p>The code for the program is:</p>
  
  <pre><code>use strict;
  use warnings;
  print "enter a DNA sequence \n";
  $DNA1=&lt;&gt;; #&lt;&gt; shorthand for STDIN
  $DNA1=~ s/\r?\n?$//;
  print $DNA1 "\n\n";
  print "enter second DNA sequence \n";
  $DNA2=&lt;&gt;;
  $DNA2=~ s/\r?\n?$//;
  print $DNA2 "\n\n";
  $DNA= join("",($DNA1,$DNA2));
  print "Both DNA sequences are \"$DNA\" \n\n";
  $DNA3=$DNA1;
  $DNA3=~ tr/ATCGatcg//;
  print $DNA3 "\n\n";
  $DNA4= join("",($DNA3,$DNA2));
  print $DNA4 "\n\n";
  exit;
  </code></pre>