title: Perl count repeated strings in array
body: <p>I have an array that is like</p>
  
  <pre><code>my @array = ('cookies','balls','cookies','balls','balls');
  </code></pre>
  
  <p>but the real one is much bigger/longer.</p>
  
  <p>How do I output the count of each repeated string in the array?</p>
  
  <p>like in the example, cookies is 2 and balls is 3.</p>