in reply to Re: Passing by Named Parameter
in thread Passing by Named Parameter

%params = %{ shift };
When I first read it, I thought it implied that shift in list context returns them all and empties the list; that is, gives the same value as %params= @_; but also empties out @_.

After reading Abagail's explaination, I see that he's passing a hashref as the first parameter, rather than passing names/values as individual parameters.

Replies are listed 'Best First'.
Re: I've never seen =that= before!
by Abigail-II (Bishop) on Jan 27, 2004 at 15:47 UTC
    And you don't want to. It means the same as
    %params = %shift;
    What you might want to see instead is:
    %params = %{+shift};

    Abigail