Loop with label : While « Statement « Perl
- Perl
- Statement
- While
Loop with label
#!/usr/bin/perl -w
use strict;
my $i = 1;
while ($i <= 5) {
my $j = 1;
while ($j <= 5) {
last if $j == 3;
print "$i ** $j = ", $i ** $j, "\n";
$j++;
}
$i++;
}
Related examples in the same category