LOOP: for( my $i = 1; $i =~ m/\d/, my $j = $i**2; $i++) { print "I saw [$i] and [$j]\n"; redo LOOP if $& == 5; last if $i == 10; }