Those two snippets aren't equivalent. Aside from the fact that the latter also exits if <STDIN> returned undef, you reversed the order of the loop body (...) and the exit condition (last INPUT if $line eq ".\n";)
In reply to Re^3: do {$i++} until vs. $i++ until
by ikegami
in thread do {$i++} until vs. $i++ until
by jethro
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |