in reply to How do I insert characters at certain positions in a string?
my $padded = ' ' x 5; substr($padded, 2, 1) = 'A'; substr($padded, 1, 1) = 'B'; [download]