Why do I get "Can't use string as a HASH ref" error when I try to access a hash element?
perl
Solution
The `Data::Dumper` module is extremely useful in such situations -- to help you figure out why a complex data structure is not meeting your expectations. For example:
use Data::Dumper;
print Dumper(\%args);
Problem
How do I fix this error? ``` foreach (values %{$args{car_models}}) { push(@not_sorted_models, UnixDate($_->{'year'},"%o")); } ``` Error: Can't use string ("1249998666") as a HASH ref while "strict refs" in use at /.../BMW.pm line 222.