For a bit more information have a look at this output from the compiler backend B::Terse.

This is the statement print ((split(//,shift(@_)))[$_[1]..$_[2]]);

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
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.

In reply to Re: strange shift @_ problem by repson
in thread strange shift @_ problem by ChOas

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.