in reply to shifting arguments
Stirctly speaking, shift() can be used on any array to remove the top (0th) element and return it. But, shift() defaults to @_ if no array is supplied. Since shift is removeing and returning only the first (0th) element, assigning it's return to and array does not work. But, since Perl always tries it's hardest, it take the one value from the right (the return from shift) and assigns it to the first element on the left. Then, when there is no second value, it simply assigns undef to the folloing vars. Thats the simple version, without getting into stacks and such
can't sleep clowns will eat me
-- MZSanford
|