Add a block or single-pass loop around your do while.
Be well,my $i = 0; { do { print $i++, $/; last if $i == 2; } while ( $i < 4); }
In reply to Re^6: last in a do while loop (for (;;))
by rir
in thread last in a do while loop
by gam3
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |