#!/usr/bin/perl use warnings; use strict; sub tear_us_outta_here { print "Getting out of loop labeled FOO.\n"; last FOO; } FOO: for ( 1 .. 10 ) { print "At $_.\n"; if ( $_ == 4 ) { tear_us_outta_here(); } } #### At 1. At 2. At 3. At 4. Getting out of loop labeled FOO. Exiting subroutine via last at ./foo.pl line 8.