#!/usr/bin/env perl use strict; SOME_LOOP: for my $outer (1..2) { print "outer: before callback with $outer\n"; call_my_callback( sub { next SOME_LOOP } ); # you say this should advance "$outer"; print "outer: after callback with $outer\n"; } sub call_my_callback { SOME_LOOP: for my $inner (1..2) { print "inner: before callback with $inner\n"; $_[0]->(); # "neeeexxxt!" print "inner: after callback with $inner\n"; } }