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

davido, I'm surprised and ashamed for you. You should have told him about shift() before or instead of +shift. The former looks normal and has identical functionality while the latter is just an abuse of unary +.

... = %{shift()}

Replies are listed 'Best First'.
Re^3: Pass By Reference Inner Workings - Magic scalar operator
by davido (Cardinal) on May 01, 2005 at 08:12 UTC

    :) Surprise and shame huh?

    Is it abuse, or acceptible use? Either way, the Perl world will survive my sin. ;) It's not all that unusual of a sight anyway, though to your point it is not as explicit as shift().

    Thanks for the gentle reminder that we shouldn't get too fancy.


    Dave