in reply to Pattern Matching and replacement

Is there a way to place text at a certain point in a string?

substr(). One of the nifty aspects of Perl is that substr() can act as an LVALUE. That is, you can assign into it.

  perldoc -f substr for details.