![]() |
|
XP is just a number | |
PerlMonks |
while loopsby root (Monk) |
on Nov 05, 1999 at 04:22 UTC ( #948=perltutorial: print w/replies, xml ) | Need Help?? |
while loops allow you to execute a group of statements so long as a statment still evaluates to true. Here's a quick example;
then num is incremented to 30 which is no longer less than 30 so the code within the while statement is not executed and execution jumps to the next statement outside of the while statement. If you think you know all about while statements learn about his less popular brother until. Edit Wed Aug 1 07:07:10 EDT 2001 - Petruchio Changed PRE tags to CODE tags, added whitespace. Edit Mon Dec 02:27:42 EST 2004 - Petruchio changed '$while' to 'while', because this is in our Tutorials section, and should be accurate.
Back to
Tutorials
|
|