title: Why do I get "Can't use string as a HASH ref" error when I try to access a hash element?
body: <p>How do I fix this error?</p>
  
  <pre><code>foreach (values %{$args{car_models}}) {
     push(@not_sorted_models, UnixDate($_-&gt;{'year'},"%o"));
  }
  </code></pre>
  
  <p>Error:
  Can't use string ("1249998666") as a HASH ref while "strict refs" in use at /.../BMW.pm line 222.</p>