in reply to shift on empty array in list context broken
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.
|
|---|