in reply to contextual substitution with s///?
Capture what should remain, not what should change:
Also note that if you are matching multiline string, the /m modifier is needed to match after a newline.$s = "test string x x\nFeb 1 09:12:33 ("; $s =~ s/^(\w{3}) /$1 /m;
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
In Section
Seekers of Perl Wisdom