if (b) { discover (b); sub discover { do lots of repetitive stuff } #### if ($b) { discover ($b); } sub discover { # do lots of repetitive stuff }