title: How do I determine the number of elements in an array reference?
body: <p>Here is the situation I am facing...</p>
  
  <pre><code>$perl_scalar = decode_json( encode ('utf8',$line));
  </code></pre>
  
  <p>decode_json returns a reference. I am sure this is an array. How do I find the size of $perl_scalar?? As per Perl documentation, arrays are referenced using @name.  Is there a workaround?</p>
  
  <p>This reference consist of an array of hashes. I would like to get the number of hashes.</p>
  
  <p>If I do length($perl_scalar), I get some number which does not match the number of elements in array.</p>