in reply to Help with hash reference mystery...
See Using References in perlref, where it explains that
after the % you can have either a simple scalar or a BLOCK
containing the hash reference. The error message you got
is a clue that it is trying to use $hash, not %hash.
In Section
Seekers of Perl Wisdom