Type of arg 1 to shift must be array (not sort) at script.pl line 7, near "@array;"