programming-examples/perl/Statement/Using a label.pl
2019-11-15 12:59:38 +01:00

16 lines
359 B
Perl

#!/usr/local/bin/perl
$total = 0;
$firstcounter = 0;
DONE: while ($firstcounter < 10) {
$secondcounter = 1;
while ($secondcounter <= 10) {
$total++;
if ($firstcounter == 4 && $secondcounter == 7) {
last DONE;
}
$secondcounter++;
}
$firstcounter++;
}
print ("$total\n");