in reply to Pass By Reference Inner Workings - Magic scalar operator

Your "shift" is being mistaken for a bareword hash key symbolic reference (thanks, davido for the correction). If you say,

my %x = %{+shift}; # or my %x = %{shift()};
that will suffice. Anything to break up the bareword evaluation to an literal key identifier. Using strict and warnings will help spot that kind of thing.

After Compline,
Zaxo