in reply to howto replace part of a string

As others have said: use substr(). But I offer this additional advice: use substr() as an lvalue like so ...
$a = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; # (remember perl strings start at position 0) substr($a,9,11) = "0123456789-"; print "\$a='$a'\n";