title: Initializing an array of hashes in Perl
body: <p>I am quite new to Perl, and I am writing a Perl script. A part of my script counts the number of times each word is appearing in the text file. THIS COUNTING REPEATS AFTER SPECIFIC INTERVALS, <strong>SO I NEED AN ARRAY FOR EACH OF THAT REPEATING SEQUENCE</strong>. I have the code to count the number of words, <strong>BUT FOR JUST ONE SEQUENCE</strong>. </p>
  
  <pre><code>for (@array) {
    $counts{$_}++;
    print "\'$_\'\t";
  }
  </code></pre>
  
  <p>My trouble is that I need to create an array for the hash "counts".</p>
  
  <p>EDIT: By ARRAY I mean that I should be able to store the repetition for each word for each particular section of the text file. I JUST NEED TO DETERMINE THE PARTIAL COUNT FOR EACH SECTION IN THE TEXT FILE. This is what my text file looks like:!</p>
  
  <p><a href="http://imageshack.us/photo/my-images/19/editstackoverflow.png/" rel="nofollow">i HAVE uploaded an image to describe in details</a></p>