in reply to How can I return to main loop, not to caller?

eval
while (<>) { if (/a/i) { eval {&a}; } else { eval {&b}; } } sub a { print "sub a\n"; &c; print "never get here\n"; } sub b { print "sub b\n"; } sub c { print "sub c\n"; die "never see this death\n"; }