Deparse tries to reproduce code, while Concise shows what's actually there.
A more accurate demonstration:
$ perl -MO=Concise,-exec -e'print if $a' 1 <0> enter 2 <;> nextstate(main 1 -e:1) v:{ 3 <#> gvsv[*a] s 4 <|> and(other->5) vK/1 5 <0> pushmark s 6 <#> gvsv[*_] s 7 <@> print vK 8 <@> leave[1 ref] vKP/REFC -e syntax OK $ perl -MO=Concise,-exec -e'$a and print' 1 <0> enter 2 <;> nextstate(main 1 -e:1) v:{ 3 <#> gvsv[*a] s 4 <|> and(other->5) vK/1 5 <0> pushmark s 6 <#> gvsv[*_] s 7 <@> print vK 8 <@> leave[1 ref] vKP/REFC -e syntax OK
But the question is about the if statement.
$ perl -MO=Concise,-exec -e'if ($a) { print }' 1 <0> enter 2 <;> nextstate(main 3 -e:1) v:{ 3 <#> gvsv[*a] s 4 <|> and(other->5) vK/1 5 <0> pushmark s 6 <#> gvsv[*_] s 7 <@> print vK 8 <@> leave[1 ref] vKP/REFC -e syntax OK
In reply to Re^2: return value of "if" (documentation?)
by ikegami
in thread return value of "if" (documentation?)
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |