On the other hand, if you use the code:
sub Create_hashref{ return {@_}; };
you get your expected result. It appears that in the absence of an operator, Perl interprets {} as a block and not an anonymous hash.
In reply to Re: Creating reference to hash and array
by kennethk
in thread Creating reference to hash and array
by vinoth.ree
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |