I think you wanted to write shift without a dollar sign. Are you using strict and warnings?
Yet even without strict, the error message is clear: Array found where operator expected means that perl thinks you want to operate on the scalar $shift but instead of an operator, it finds the array you wanted to shift.
In reply to Re: Assign regexp output to array not working
by betterworld
in thread Assign regexp output to array not working
by bowei_99
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |