Perl Programming/Keywords/until

Previous: untie Keywords Next: use

The until keyword

until is the statement that uses the EXPRESSION, called the condition, to loop until the condition is false. It is the opposite of the while statement.

Syntax

  until EXPRESSION

Examples

The code
$i = 5;
print $i++ while $i <= 10;
$j = 5;
print $j++ until $j >  10;
prints the same twice:

See also

Previous: untie Keywords Next: use
Category:Book:Perl Programming#Keywords/until%20
Category:Book:Perl Programming