http://qs1969.pair.com?node_id=950

while loops test the condition before every execution of the loop. Sometimes you want it to be tested after the loop. This guarantees that the loop is run once before the condition is tested.

$value=5
do{
  print "$value\n";
  $value=$value-1;
} while($value>10);

The above code prints out:
5
Then it tests $value which is now equal to 4 to see if it greater than 10. Since it is not the code within the loop is not run again

Next find out about do until loops