On
shift:
If ARRAY is omitted, shifts the @_ array within the lexical scope of subroutines and formats...
So shift works on
@_, that means shift, shift is a list containing the first two arguments that traverse_sequences hands to the callback function.
docs on traverse_sequences was too long a read for me at the moment. You should be able to find the answer in there.