begin(); do_stuff(); end(); sub do_stuff { my status = stuff(); if (status is ok) { more_stuff(); } return status; }