This is the statement print ((split(//,shift(@_)))[$_[1]..$_[2]]);
Now I don't know about you but I can sort of follow much of that, but the important part is seeing that the lslice line comes before the shift one. Which I assume means that it is dealt with first.LISTOP (0x817e1d0) print OP (0x817e1f8) pushmark BINOP (0x817e1a8) lslice UNOP (0x817e160) null [141] OP (0x817e188) pushmark UNOP (0x817e0f8) null UNOP (0x817e0d8) flop UNOP (0x817e0b8) flip [6] LOGOP (0x817e090) range [5] UNOP (0x817dfe0) null [127] UNOP (0x817dfa0) null [125] SVOP (0x817df80) aelemfast GV (0x +80f6760) *_ OP (0x817dfc0) null [5] UNOP (0x817e068) null [127] UNOP (0x817e028) null [125] SVOP (0x817e008) aelemfast GV (0x +80f6760) *_ OP (0x817e048) null [5] UNOP (0x817e118) null [141] OP (0x817e140) pushmark LISTOP (0x817df00) split [4] PMOP (0x817ddf0) pushre // UNOP (0x817dee0) shift UNOP (0x817dec0) rv2av [3] SVOP (0x817de30) gv GV (0x80f6760) *_ SVOP (0x817df28) const IV (0x80fa958) 0
In reply to Re: strange shift @_ problem
by repson
in thread strange shift @_ problem
by ChOas
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |