lots of code .. .. sub foo { this; that; if (cond) { CODE: many lines of code here; } else { for (a loop) { something based on $_; CODE: many lines of code here; } } } #### lots of code .. .. sub foo { this; that; if (cond) { bar(); } else { for (a loop) { something based on $_; bar(); } } subsub bar { CODE: many lines of code here; } }