use strict; use warnings; my $f= " Joe Bloggs, 1615 Thislane Street\n"; substr($f, 20, 12345, "This is a new longer address\n"); print $f;