How to conditionally substitute in files?
[email protected] ("Siegfried Heintze (Aditi)")
| Newsgroups | perl.beginners |
|---|---|
| Message-ID | <EB070C90E3B48C4F97C7AC252BACE9E72326A6B42E@NA-EXMSG-C125.redmond.corp.microsoft.com> |
This works: perl -i.bak -ple "s/class/xybpublicabc/g" Migration.cs However, when there are no matches, it still creates a new .bak file. How can we not change the date time on a file if there are no substitutions make?