Here, all loop constructs introduces a scope for the expression just as they would if it was a block. if however doesn't.
What if?
>perl -MO=Deparse -e"local $If = 'local' if 1;" local $If = 'local'; -e syntax OK
However, fixing the test so if actually exists at run-time doesn't alter the results.
In reply to Re^2: statement vs. block?
by ikegami
in thread statement vs. block?
by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |