B::Deparse is your friend here.
Ah. Well. Coming from you I'll take your word for it. But frankly I tend not to trust B::Deparse too much. :-)
D:\Development>perl -MO=Deparse -e "for ($x = 0; $x < 10; $x++) {}" for ($x = 0; $x < 10; ++$x) { (); } -e syntax OK D:\Development>perl -MO=Deparse,-x3 -e "for ($x = 0; $x < 10; $x++) { +}" $x = 0; while ($x < 10) { (); } continue { ++$x } -e syntax OK
This is on 5.6.1 AS631. Btw from the documentation for the -x switch
Expand conventional syntax constructions into equivalent ones that expose their internal operation. LEVEL should be a digit, with higher values meaning more expansion. As with -q, this actually involves turning off special cases in B::Deparse's normal operations.
Which suggests to me that im right. (But which is also why I asked a Guru like yourself. I was hoping for a definitive answer that did not depend on Deparse.)
Nevertheless, thanks.
Yves / DeMerphqIn reply to Re: Re: Re: Re: for ( ; ; ) vs for ( .. )
by demerphq
in thread for ( ; ; ) vs for ( .. )
by Popcorn Dave
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |