use strict; use warnings; sub routine { print "test1\n"; eval { goto OUT; }; print "test2\n"; OUT: print "test3\n"; } routine();