Note that Deparse turns both while () {} and for (;;) {} into while (1) {}.
All three are identical in the optree, but it's closer to while () {}. No "1" constant exists. All C-style for loops, while loops and bare loops ("{ ... }") are implemented using the same loop op. The condition of "while (1)" is completely optimised away.
In reply to Re^2: while () vs. while (1) (trivia)
by ikegami
in thread while () vs. while (1)
by perl5ever
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |