Perl WHILE Loop Function
What is While loop function in Perl programming?
The While loop function
in Perl is used to execute statements till the condition becomes false.
Statement to be executed
In the above syntax the code segment is executed till the "expr1" becomes false, here the iteration never stops even the condition becomes false until it checks the "expr1".
print "content-type: text/htmlnn";
print "This is line".$c."<br>";
This is line0
This is line1
This is line2
This is line3
This is line4
This is line5
In the above example when the value of $c becomes 6, the iteration continues till the "expr1" is checked and as the condition is false the code execution is stopped.