in reply to Substitution replacement not terminated
BTW: Why do you run perl from perl? You can do the work inside the script, as well (untested):
open my $IN, '<', 'text.txt' or die $!; open my $OUT, '>', 'text.new' or die $!; while (<$IN>) { s/^(.{10})(.{382})(.*)$/$1^$2^$3/; print $OUT, $_; } close $OUT or die $!; rename 'text.new', 'text.txt';
|
|---|