[Kc] Scalar + Shift?

djgoku djgoku at gmail.com
Thu Aug 3 07:47:43 PDT 2006


On 8/3/06, Joshua McAdams <joshua.mcadams at gmail.com> wrote:
> shift operates on @_ by default, so when you do a:
>
>   my $scalar = shift;
>
> you are really doing a:
>
>   my $scalar = shift @_;

/me smacks forehead

> which shifts the first argument passed to a subroutine off of the
> array of arguments and into the scalar variable.

haha I knew that really! =\


More information about the kc mailing list