title: When does Perl auto-initialize variables?
body: <p>Here is some simple Perl to count the number of times a value occurs in an array. This runs without any warnings.</p>
  
  <pre><code>use warnings;
  use strict;
  
  my @data = qw(1 1 2 3 4 5 5 5 9);
  my %histogram;
  foreach (@data)
  {
      $histogram{$_}++;
  }
  </code></pre>
  
  <p>When the loop body is changed to</p>
  
  <pre><code>$histogram{$_} = $histogram{$_} + 1;
  </code></pre>
  
  <p>Perl warns "Use of uninitialized value in addition".</p>
  
  <p>What is going on under the hood? Why is the value initialized when supplied as an operand to the ++ operator and uninitialized with the + operator?</p>