<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>cyborgworkshop.org &#187; perl</title>
	<atom:link href="http://cyborgworkshop.org/category/perl/feed/" rel="self" type="application/rss+xml" />
	<link>http://cyborgworkshop.org</link>
	<description>Blurring the line</description>
	<lastBuildDate>Wed, 18 May 2011 13:57:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Replacing every instance of a word in a file</title>
		<link>http://cyborgworkshop.org/2008/05/19/replacing-every-instance-of-a-word-in-a-file/</link>
		<comments>http://cyborgworkshop.org/2008/05/19/replacing-every-instance-of-a-word-in-a-file/#comments</comments>
		<pubDate>Mon, 19 May 2008 15:23:08 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[replace]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[substitute]]></category>

		<guid isPermaLink="false">http://cyborgworkshop.org/?p=47</guid>
		<description><![CDATA[Sometimes, code isn&#8217;t written to be especially portable and requires some hand editing to coax it to run on a new machine. A shortcut that I&#8217;m fond of using is to set off a perl script to search for every instance of $WORD inside of $FILE. So if I wanted to replace every instance of [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes, code isn&#8217;t written to be especially portable and requires some hand editing to coax it to run on a new machine.  A shortcut that I&#8217;m fond of using is to set off  a perl script to search for every instance of $WORD inside of $FILE.  So if I wanted to replace every instance of &#8220;jason&#8221; inside of all of the files that are &#8220;.html&#8221; with the word &#8220;dude&#8221; I would use the following.</p>
<blockquote><p>perl -pi -e &#8216;s/jason/dude/g&#8217; *.html</p></blockquote>
<p>To make that caps insensitive, run it like so</p>
<blockquote><p>perl -pi -e &#8216;s/jason/dude/gi&#8217; *.html</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://cyborgworkshop.org/2008/05/19/replacing-every-instance-of-a-word-in-a-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

