News for hackers. Stuff that matters.
Re:Useful Perl one-liners (2013) by paulmd on Tuesday November 29, 2016 @01:44PM (#13065191)
Perl's substitution and translation facilities work pretty much the same way as sed, if you understand sed you can just drop those operations into Perl. For example, sed -i 's/old/new/' will do an in-place replacement of all strings 'old' with the string 'new'.

I find that you do escaping a little differently with sed though. For example you need to escape +'s for them to have their normal "one or more matches" semantics. Might just be an abnormality of my environment (Cygwin).

There are no comments on this comment yet.