The left side of -> is supposed to be an expression that returns a reference. Use anything else at your own risk.

%foo->{a} used to work.

$ 5.10t/bin/perl -e'my %foo; %foo->{a} = 1; print "ok

";' ok

This was deemed to be bug.

$ 5.12t/bin/perl -e'my %foo; %foo->{a} = 1; print "ok

";' Using a hash as a reference is deprecated at -e line 1. ok $ 5.20t/bin/perl -e'my %foo; %foo->{a} = 1; print "ok

";' Using a hash as a reference is deprecated at -e line 1. ok $ 5.22t/bin/perl -e'my %foo; %foo->{a} = 1; print "ok

";' Can't use a hash as a reference at -e line 1.

There's no reason to believe %foo->@{...} is any more valid than %foo->{...} .

Bug reported.