in reply to Re^3: Assigning value through references
in thread Assigning value through references

That is not the same thing. $ref->{$key}{NAME} uses a hash reference stored in the scalar variable $ref, whereas $ref{$key}{NAME} uses a hash stored in the hash variable %ref.