Questions about this topic? Sign up to ask in the talk tab.
Difference between revisions of "Perl/Basics/Loops/Until"
From NetSec
AlizaLorenzo (Talk | contribs) (Created page with "* An '''until''' loop executes '''until''' a condition is '''true'''. {{code|text=<source lang="perl">my $switch; my $counter; until (defined $switch) { print $counter; $...") |
(No difference)
|
Latest revision as of 02:58, 16 July 2012
- An until loop executes until a condition is true.
my $switch; my $counter; until (defined $switch) { print $counter; $counter++; $switch = 1 if ($counter > 100); } |
The above code will execute until $switch is defined.