for (@old) { push @new,@pre if /START_RE/; push @new,$_; push @new,@post if /END_RE/; }