in reply to Re: subroutine arguments
in thread subroutine arguments

Try passing the list as a reference ... Then, shift off the list

I don't mean to sound petty, but in situations like this it's especially important to be mindful of the difference between an array and a list. You can't take a reference to a list. It's an array reference.