in reply to Re: substr and strings on the outside
in thread substr and strings on the outside

I suspect I don't understand the question (or Perl) but...

If you are trying to insert an arbitary string wouldn't s/// do the trick?

use strict; use warnings; my $f="Joe Bloggs, 1615 Thislane Street, MyTown, NZ, 1851\n"; my $in=" This is a new longer address"; print $f; $f=~s/,.*/,$in/s; print $f;
--mandog