in reply to Re: Why does the first $c evaluate to the incremented value in [$c, $c += $_] ?
in thread Why does the first $c evaluate to the incremented value in [$c, $c += $_] ?

$c is incremented only after the second value is stored into the array,

That's not true. The order in which things happen:

  1. $c
  2. $c
  3. post-increment
  4. my @a
  5. list assign

@a doesn't even exist at the point you say values are assigned to it.

>perl -MO=Concise,-exec -e"my @a = ( $c, $c++ );" 1 <0> enter 2 <;> nextstate(main 1 -e:1) v:{ 3 <0> pushmark s 4 <#> gvsv[*c] s # $c 5 <#> gvsv[*c] s # $c 6 <1> postinc[t4] sK/1 # post-increment 7 <0> pushmark s 8 <0> padav[@a:1,2] lRM*/LVINTRO # my @a 9 <2> aassign[t5] vKS/COMMON # list assignment a <@> leave[1 ref] vKP/REFC -e syntax OK