title: Array initialization in Perl
body: <p>How do I initialize an array to 0?</p>
  
  <p>I have tried this.</p>
  
  <pre><code>my @arr = ();
  </code></pre>
  
  <p>But it always throws me a warning, <em>"Use of uninitialized value"</em>. I do not know the size of the array beforehand. I fill it dynamically. I thought the above piece of code was supposed to initialize it to 0.</p>
  
  <p>How do I do this?</p>