<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Snipplr</title>
    <description>Recent snippets posted on Snipplr.com</description>
    <link>https://snipplr.com/</link>
    <lastBuildDate>Wed, 10 Jun 2026 09:52:34 +0000</lastBuildDate>
    <item>
      <title>(Perl) Search and replace across multiple files - jessibird</title>
      <link>https://snipplr.com/view/18462/search-and-replace-across-multiple-files</link>
      <description>&lt;p&gt;-p tells perl to assume a simple loop around the code we give it to run.&#13;
&#13;
-i.bak tells perl that we wish to create backups of the files we modify with the suffix .bak.&#13;
&#13;
-e "..." tells perl that we wish to execute the code inside the quotes.&#13;
&#13;
And finally the file list is the list of files that we wish to operate upon.&#13;
&#13;
Escape special characters such as ".", "?", "*", or "/" by preceding them with the "\" character.&#13;
&#13;
Example: change "Bob" to "Steve" on all HTML files in the current directory:&#13;
&#13;
perl -pi.bak -e "s/Bob/Steve/g" *.html&lt;/p&gt;</description>
      <pubDate>Tue, 18 Aug 2009 11:49:01 UTC</pubDate>
      <guid>https://snipplr.com/view/18462/search-and-replace-across-multiple-files</guid>
    </item>
  </channel>
</rss>
