Documented in
For Loops in
perlsyn:
As a special case, if the test in the for loop (or the corresponding while loop) is empty, it is treated as true. That is, both
for (;;) {
...
}
and
while () {
...
}
are treated as infinite loops.
Not very well placed documentation, and counter-intuitive from my perspective, but documented.
Update:: A little Googling pulled up while () vs. while (1), particularly Re: while () vs. while (1).
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.