in reply to Re^2: shift on empty array in list context broken
in thread shift on empty array in list context broken
>well splice also says
> The following equivalences hold
> ...
> shift(@a)     splice(@a,0,1)
It would appear shift is doing something like this:
DB<232> x $x=4; while( ($y)= ( $u = splice( @t,0,1 ))){ last unless +$x--; print ":$_: " } :: :: :: :: empty array
which would make the equivalence:
shift(@a) === ( $t = splice( @a,0,1 ) )
|
|---|