title: Type of argument to keys on reference must be unblessed
body: <p>I am very new to perl and I have been given the task of maintaining a webpage. I have found a bug that I do not know how to fix. </p>
  
  <p>The perl script stops on the following code. </p>
  
  <pre><code>my @failedTests = (sort(keys ($TestResultsData{$currPlatform}{$currDate}{failedtests})));
  while ( @failedTests )
  {
   ...
  </code></pre>
  
  <p>The error message is:</p>
  
  <pre><code>Type of argument to keys on reference must be unblessed hashref or arrayref.
  </code></pre>
  
  <p>Can that line of code be re-written so that it works?</p>