No, it shouldn't. Operators and subs that one expects to return a scalar should do so in list context too. It leads to weird and sometimes subtle (i.e. hard to debug) problems if they sometimes return an empty list instead. The purpose of shift is to return a scalar, and it should do so.
In reply to Re: shift on empty array in list context broken
by ikegami
in thread shift on empty array in list context broken
by LanX
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |