Perl Programming/Keywords/while
The while keyword
editwhile 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.
Syntax
edit while EXPRESSION
Examples
edit
The following two print statements
$i = 5;
print $i++ while $i <= 10;
$j = 5;
print $j++ until $j > 10;
return the same:
5678910 5678910