Hello Athanasius!

No idea about the camel book, I have to admit I never read it.

my understanding is that the values from RHS are temporarily pushed on a stack like structure and from there assigned to the LHS.

B::Concise shows

~$ perl -MO=Concise -e '($a,$b)=($b,$a)' a <@> leave[1 ref] vKP/REFC ->(end) 1 <0> enter ->2 2 <;> nextstate(main 1 -e:1) v:{ ->3 9 <2> aassign[t5] vKS/COMMON ->a - <1> ex-list lKP ->6 3 <0> pushmark s ->4 - <1> ex-rv2sv sK/1 ->5 4 <#> gvsv[*b] s ->5 - <1> ex-rv2sv sK/1 ->- 5 <#> gvsv[*a] s ->6 - <1> ex-list lKPRM* ->9 6 <0> pushmark sRM* ->7 - <1> ex-rv2sv sKRM*/1 ->8 7 <#> gvsv[*a] s ->8 - <1> ex-rv2sv sKRM*/1 ->- 8 <#> gvsv[*b] s ->9 -e syntax OK

so you might wanna look into ex-list (where both sides are stored) and aassign ("array-assign" which is a misnomer).

Unfortunately I couldn't find a good compilation explaining all these ops.

From the Llama (Learning Perl, 3rd Edition)

3.4. List Assignment

In much the same way as scalar values may be assigned to variables, list values may also be assigned to variables:

($fred, $barney, $dino) = ("flintstone", "rubble", undef);

All three variables in the list on the left get new values, just as if we did three separate assignments. Since the list is built up before the assignment starts, this makes it easy to swap two variables' values in Perl:72


72) As opposed to in languages like C, which has no easy way to do this in general. C programmers usually resort to some kind of macro to do this, or use a variable to temporarily hold the value.

Hope this helps! :)

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)

PS: Je suis Charlie!


In reply to Re^6: Accessing Arguments inside Subroutines via @_ by LanX
in thread Accessing Arguments inside Subroutines via @_ by citi2015

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.