title: Perl Program to Mimic RNA Synthesis
body: <p>Looking for suggestions on how to approach my Perl programming homework assignment to write an RNA synthesis program. I've summed and outlined the program below. Specifically, I'm looking for feedback on the blocks below (I'll number for easy reference). I've read up to chapter 6 in Elements of Programming with Perl by Andrew Johnson (great book). I've also read the perlfunc and perlop pod-pages with nothing jumping out on where to start.  </p>
  
  <p>Program Description: The program should read an input file from the command line, translate it into RNA, and then transcribe the RNA into a sequence of uppercase one-letter amino acid names.  </p>
  
  <ol>
  <li><p>Accept a file named on the command line</p>
  
  <blockquote>
    <p>here I will use the &lt;> operator  </p>
  </blockquote></li>
  <li><p>Check to make sure the file only contains acgt or die  </p>
  
  <pre><code>if ( &lt;&gt; ne [acgt] ) { die "usage: file must only contain nucleotides \n"; }  
  </code></pre></li>
  <li><p>Transcribe the DNA to RNA (Every A replaced by U, T replaced by A, C replaced by G, G replaced by C)  </p>
  
  <blockquote>
    <p>not sure how to do this  </p>
  </blockquote></li>
  <li><p>Take this transcription &amp; break it into 3 character 'codons' starting at the first occurance of "AUG"  </p>
  
  <blockquote>
    <p>not sure but I'm thinking this is where I will start a %hash variables?  </p>
  </blockquote></li>
  <li><p>Take the 3 character "codons" and give them a single letter Symbol (an uppercase one-letter amino acid name)  </p>
  
  <blockquote>
    <p>Assign a key a value using (there are 70 possibilities here so I'm not sure where to store or how to access)  </p>
  </blockquote></li>
  <li><p>If a gap is encountered a new line is started and process is repeated  </p>
  
  <blockquote>
    <p>not sure but we can assume that gaps are multiples of threes.  </p>
  </blockquote></li>
  <li><p>Am I approaching this the right way? Is there a Perl function that I'm overlooking that can simplify the main program?  </p></li>
  </ol>
  
  <h3>Note</h3>
  
  <p>Must be self contained program (stored values for codon names &amp; symbols).  </p>
  
  <p>Whenever the program reads a codon that has no symbol this is a gap in the RNA, it should start a new line of output and begin at the next occurance of "AUG". For simplicity we can assume that gaps are always multiples of threes.</p>
  
  <p>Before I spend any additional hours on research I am hoping to get confirmation that I'm taking the right approach. Thanks for taking time to read and for sharing your expertise!    </p>