for(@Input) { do_this($_) and next if /$Start/; do_that($_) if /$Finish/; }