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.

  print "$value\n";
} while($value>10);

The above code prints out:
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