C:\Windows\system32>perl -MO=Concise -E"substr(( substr( $p, 0, 1 ) = + '123' ), 0, 1 ) = 'x';" d <@> leave[1 ref] vKP/REFC ->(end) 1 <0> enter ->2 2 <;> nextstate(main 47 -e:1) v:%,{,469764096 ->3 - <1> ex-sassign vKS/2 ->d c <@> substr[t5] vKS/REPL1ST,3 ->- - <0> ex-pushmark s ->4 3 <$> const[PV "x"] s ->4 9 <2> sassign sKPRMS*/2 ->a 4 <$> const[PV "123"] s ->5 8 <@> substr[t3] sKRM*/3 ->9 - <0> ex-pushmark s ->5 - <1> ex-rv2sv sKRM*/1 ->6 5 <#> gvsv[*p] s ->6 6 <$> const[IV 0] s ->7 7 <$> const[IV 1] s ->8 a <$> const[IV 0] s ->b b <$> const[IV 1] s ->c -e syntax OK C:\Windows\system32>perl -MO=Concise -E"substr((( substr $q, 0, 1 ) = + '123' ), 0, 1 ) = 'x'" f <@> leave[1 ref] vKP/REFC ->(end) 1 <0> enter ->2 2 <;> nextstate(main 47 -e:1) v:%,{,469764096 ->3 - <1> ex-sassign vKS/2 ->f e <@> substr[t6] vKS/REPL1ST,3 ->- - <0> ex-pushmark s ->4 3 <$> const[PV "x"] s ->4 b <2> aassign[t4] sKPRMS* ->c - <1> ex-list lK ->6 4 <0> pushmark s ->5 5 <$> const[PV "123"] s ->6 - <1> ex-list lK ->b 6 <0> pushmark s ->7 a <@> substr[t3] sKPRM*/3 ->b - <0> ex-pushmark s ->7 - <1> ex-rv2sv sKRM*/1 ->8 7 <#> gvsv[*q] s ->8 8 <$> const[IV 0] s ->9 9 <$> const[IV 1] s ->a c <$> const[IV 0] s ->d d <$> const[IV 1] s ->e -e syntax OK
see ikegami's answer here Re: Why Perl gets confused here?
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!
*) aassign for "array" assignment is one of these misnomers like wantarray , should rather be named lassign
In reply to Re: Why Perl gets confused here?
by LanX
in thread Why Perl gets confused here?
by vr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |