title: String matching in perl, find number of matches
body: <p>How do I find the <code>number of of each 2 consecutive characters AA, AC,AG,AT,CC,CA...</code> in a sequence like this:</p>
  
  <pre><code>$sequence = 'AACGTACTGACGTACTGGTTGGTACGA' 
  </code></pre>
  
  <p>Overlapping is not allowed i.e the $sequence contains from left to right AA CG TA CT....and not AA AC CG ...</p>