, , , : , , . , while, , - , condition, last:
while (condition) {
# blah, blah, blah
}
if (condition) {
# condition is still true, loop must have exited early due to "last"
} else {
# loop exited because condition is no longer true
}
, condition false, , , :
my $iter_finished;
while (condition) {
$iter_finished = 0;
if (foo) { last };
if (bar) { condition = 1; last };
if (baz) { condition = 0; last };
$iter_finished = 1;
}
if ($iter_finished) {
} else {
}