in reply to creating references
Note also that you are creating a lexical variable with the my %hash=(); statement, and the *foo{THING} syntax applies only to package variables; you get the '... "main::hash" used only once ...' message because there is no %hash package hash variable in existence.
In Section
Seekers of Perl Wisdom