< Perl Programming | Keywords
The while keywordEdit
while is the statement that uses the EXPRESSION, called the condition, to loop through a block until the condition is true. It is the opposite of the until statement.
The following two print statements
$i = 5; print $i++ while $i <= 10; $j = 5; print $j++ until $j > 10;
return the same: