title: Perl, JSON parsing values incorrectly
body: <p>I'm parsing a JSON string that is stored in a database.</p>
  
  <p><code>{"name":"simon", "age":"23", "height":"tall"}</code></p>
  
  <p>I'm pulling the data, then decoding. When running the code below, I'm receiving weird 'HASH' values back.</p>
  
  <pre><code>use JSON;
  
  $data = decode_json($row-&gt;{'address'});
  for my $key (keys %$data){
         if($data-&gt;{$key} ne ''){
                 $XML .= "      &lt;$key&gt;$data-&gt;{$key}&lt;/$key&gt;";
         }
  }
  
  // Returns data like so 
  
  &lt;company_type&gt;HASH(0x27dbac0)&lt;/company_type&gt;
  &lt;county&gt;HASH(0x27db7c0)&lt;/county&gt;
  &lt;address1&gt;HASH(0x27dba90)&lt;/address1&gt;
  &lt;company_name&gt;HASH(0x27db808)&lt;/company_name&gt;
  </code></pre>
  
  <p>The Error happens when I have a data set like so:</p>
  
  <p><code>{"name":"", "age":{}, "height":{}}</code></p>
  
  <p>I don't understand why JSON / Arrays / Hashes have to be so difficult to work with in Perl. What point am I missing?</p>