programming-examples/perl/Statement/Using block labels with next in nested looping structures.pl

12 lines
249 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
OUTER: foreach $row ( 1 .. 10 ) {
INNER: foreach $column ( 1 .. 10 ) {
if ( $row < $column ) {
print "\n";
next OUTER;
}
print "$column ";
}
}