in reply to Re: benchmark for shift vs list assignment for object methods
in thread benchmark for shift vs list assignment for object methods

shift is indeed modifying the array, but keep in mind this is the @_ array, not a globally used one. It does make a difference if you later in your subroutine would use @_, but that doesn't happen that often.

List assignment and shifting off from @_ are two very commonly used techniques to put the subroutine arguments into variables. And since @_ is not used further in the subroutine, the fact that @_ is or isn't modified is irrelevant.

Abigail