title: How can I update a hash value using a hash reference in Perl?
body: <p>Is there a way to update a value in a hash using a hash reference that points to the hash value?</p>
  <p>My hash output looks like this:</p>
  <pre><code>    'Alternate' =&gt; {
          'free' =&gt; '27.52',
          'primary' =&gt; 'false',
          'used' =&gt; '0.01',
          'name' =&gt; '/mydir/journal2',
          'size' =&gt; '50.00'
       },
      'Primary' =&gt; {
          'free' =&gt; '60.57',
          'primary' =&gt; 'true',
          'used' =&gt; '0.06',
          'name' =&gt; '/mydir/journal',
          'size' =&gt; '64.00'
      }
  };
  </code></pre>
  <p>I attempted to create a hash reference to the 'used' property in the hash and tried to update the value:</p>
  <pre><code>$hash_ref = \%hash-&gt;{&quot;Primary&quot;}-&gt;{used};
  $hash_ref = &quot;99%&quot;;
  print $$hash_ref, &quot;\n&quot;;
  </code></pre>
  <p>This changes the value of the hash, but I get the &quot;Using a hash as a reference is deprecated at line X&quot;. I'd like to know if what I'm trying to do is possible and what I'm doing wrong.</p>