#!/usr/bin/perl use strict; use warnings; # Ivan Novick # loop_labels.pl # this is a loop label so we can use next in reference to the outer loop # by default next will refer to the inner loop myouter: for my $i (1..10) { for my $j (1..10) { print "$i . $j\n"; # under certain condition break out of the outer loop next myouter if ($i == $j); } }