How do I fix this error?
foreach (values %{$args{car_models}}) {
push(@not_sorted_models, UnixDate($_->{\'year\'},\"%o\"));
}
Error:
Hi if you have a hash ref variable (like $hash_ref) then code will be
if ( ref($hash_ref) eq 'HASH' and exists $hash_ref->{year} ) {
push(@not_sorted_models, UnixDate($hash_ref->{year},"%o"));
}
#instead of below:
if ( ref eq 'HASH' and exists $_->{year} ) {
push(@not_sorted_models, UnixDate($_->{year},"%o"));
}