in reply to Re: Difference of localtime
in thread Difference of localtime
Furthermore, scalar is optimized away even when it isn't redundant, since scalar only has a compile-time effect.
>perl -MO=Concise -e"@a = scalar @b" a <@> leave[1 ref] vKP/REFC ->(end) 1 <0> enter ->2 2 <;> nextstate(main 1 -e:1) v:{ ->3 9 <2> aassign[t5] vKS ->a - <1> ex-list lK ->6 3 <0> pushmark s ->4 - <1> scalar sK/1 ->- <--- Note leading dash 5 <1> rv2av[t4] sK/1 ->6 <--- "s" means "scalar" 4 <#> gv[*b] s ->5 did its job. - <1> ex-list lK ->9 6 <0> pushmark s ->7 8 <1> rv2av[t2] lKRM*/1 ->9 7 <#> gv[*a] s ->8 -e syntax OK
It's impossible for scalar to work at run-time, since operands are evaluated before their operator.
|
|---|