title: Why am i getting an "Odd number of elements in anonymous hash " warning
body: <p>I'm getting a warning in my perl code and don't know why...</p>
  
  <p>Warning:</p>
  
  <pre><code>Odd number of elements in anonymous hash at /Users/../Tree.pm line 56.
  </code></pre>
  
  <p>Which gives me that line :</p>
  
  <pre><code>$dic-&gt;{$firstLetter}={$letra};
  </code></pre>
  
  <p>Is there a problem with the implementation?</p>
  
  <p>I mean, it passes all the tests, but it's giving me these errors ... like 10 times always on the same line!
  Please, some advice will be welcome! :)</p>
  
  <pre><code>sub add_word{
      my ($self,$word) = @_ ;
      my $dic = $self-&gt;{'dic'};
      my @array = split(//,$word);
      my $firstLetter = shift @array;
      for my $letra(@array){
              if(!$dic-&gt;{$firstLetter}){
                      $dic-&gt;{$firstLetter} = {$letra};
                      $dic = $dic-&gt;{$firstLetter};
              }
              else{
                      if($dic-&gt;{$firstLetter}){
                              $dic = $dic-&gt;{$firstLetter};
                      }
              }
              $firstLetter = $letra;
      }
      $dic-&gt;{$firstLetter} = {"\$" =&gt; "\$"};
  }
  </code></pre>