in reply to Re^3: shift on empty array in list context broken
in thread shift on empty array in list context broken

splice didnt lie

The array is manipulated exactly like shift would manipulate it.

The return value is exactly as documented for splice/shift.

The equivalences chart is part but not the whole documentation.

  • Comment on Re^4: shift on empty array in list context broken

Replies are listed 'Best First'.
Re^5: shift on empty array in list context broken
by ikegami (Patriarch) on Jul 15, 2019 at 11:15 UTC

    The statement is still false even if it's surrounded by true ones.

      The statement is still false even if it's surrounded by true ones.

      Except that its not false even a little

      equivalence n 1: a state of being essentially equal or equivalent;

        And shift(@a) is equivalent to splice(@a,0,1) —they can have evaluate to completely different values— making the statement false.

        Returning a single undefined scalar is different than returning none at all.