my $f = " "; $f =~ s/^(.{0,5}).{0,5}/${1}12345/;
The only problem is this regex doesn't pad extra spaces if your string is too short, but at least it still does the replacement.
elbieelbieelbie
In reply to (elbie): substr and strings on the outside
by elbie
in thread substr and strings on the outside
by JPaul
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |