12 lines
242 B
Perl
12 lines
242 B
Perl
|
$number = 1;
|
||
|
|
||
|
while ( $number <= 5 ) {
|
||
|
|
||
|
if ( $number <= 10 ) {
|
||
|
print "$number ";
|
||
|
++$number;
|
||
|
redo; # Continue loop without testing ( $number <= 5 )
|
||
|
}
|
||
|
}
|
||
|
|
||
|
print "\nStopped when \$number became $number.\n";
|