sub part0 { ... } sub part1 { ... } if ( $condition1 ) { { part0(); last if $condition2; part1(); } --$loop; }