www.perl.com
Perl Programming
Loop Statements
  • Loop statements provide a boolean context
  • while
    • Loops while boolean is true
  • until
    • Loops until boolean is true
    • Opposite of while
  • do
    • At least one loop, then depends on while or until

        while ($hungry) {
            $hungry = eat($banana);
        }

        do {
            $answer = get_answer();
            $correct = check($answer);
        } until ($correct);
      
Previous http://stuff.mit.edu/iap/perl/