<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
	
	>
<channel>
	<title>
	Comments on: Perl function equivalent of PHP&#8217;s AddSlashes()	</title>
	<atom:link href="https://www.brandonchecketts.com/archives/perl-function-equivalent-of-phps-addslashes/feed" rel="self" type="application/rss+xml" />
	<link>https://www.brandonchecketts.com/archives/perl-function-equivalent-of-phps-addslashes</link>
	<description>Web Programming, Linux System Administation, and Entrepreneurship in Athens Georgia</description>
	<lastBuildDate>Fri, 02 Sep 2011 03:46:47 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>
	<item>
		<title>
		By: James M.		</title>
		<link>https://www.brandonchecketts.com/archives/perl-function-equivalent-of-phps-addslashes/comment-page-1#comment-2751</link>

		<dc:creator><![CDATA[James M.]]></dc:creator>
		<pubDate>Fri, 02 Sep 2011 03:46:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.brandonchecketts.com/archives/60#comment-2751</guid>

					<description><![CDATA[Thanks! This little routine saved me some time :-)]]></description>
			<content:encoded><![CDATA[<p>Thanks! This little routine saved me some time 🙂</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: John May		</title>
		<link>https://www.brandonchecketts.com/archives/perl-function-equivalent-of-phps-addslashes/comment-page-1#comment-1328</link>

		<dc:creator><![CDATA[John May]]></dc:creator>
		<pubDate>Wed, 05 Aug 2009 21:29:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.brandonchecketts.com/archives/60#comment-1328</guid>

					<description><![CDATA[$term =~ s/([\\\&#039;\&quot;])/\\$1/gi;  Is not the same, the backslash needs to be escaped first.  The one liner will escape the first character that appears in $term. Also /i isn&#039;t needed and is very wasteful*. To prevent SQL injection it&#039;s better to use placeholders** where possible.


*Friedl, J., 2006. Mastering Regular Expressions 3rd ed., O&#039;Reilly Media, Inc.
**https://www.perlmonks.com/?node_id=678757]]></description>
			<content:encoded><![CDATA[<p>$term =~ s/([\\\&#8217;\&#8221;])/\\$1/gi;  Is not the same, the backslash needs to be escaped first.  The one liner will escape the first character that appears in $term. Also /i isn&#8217;t needed and is very wasteful*. To prevent SQL injection it&#8217;s better to use placeholders** where possible.</p>
<p>*Friedl, J., 2006. Mastering Regular Expressions 3rd ed., O&#8217;Reilly Media, Inc.<br />
**https://www.perlmonks.com/?node_id=678757</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Not Real		</title>
		<link>https://www.brandonchecketts.com/archives/perl-function-equivalent-of-phps-addslashes/comment-page-1#comment-1327</link>

		<dc:creator><![CDATA[Not Real]]></dc:creator>
		<pubDate>Mon, 03 Aug 2009 13:14:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.brandonchecketts.com/archives/60#comment-1327</guid>

					<description><![CDATA[How is this different than DBI&#039;s quote method:

https://search.cpan.org/~timb/DBI/DBI.pm#quote

Is this for when you are doing database work but not using DBI? (which is just crazy talk)]]></description>
			<content:encoded><![CDATA[<p>How is this different than DBI&#8217;s quote method:</p>
<p><a href="https://search.cpan.org/~timb/DBI/DBI.pm#quote" rel="nofollow ugc">https://search.cpan.org/~timb/DBI/DBI.pm#quote</a></p>
<p>Is this for when you are doing database work but not using DBI? (which is just crazy talk)</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Mary Shaw		</title>
		<link>https://www.brandonchecketts.com/archives/perl-function-equivalent-of-phps-addslashes/comment-page-1#comment-698</link>

		<dc:creator><![CDATA[Mary Shaw]]></dc:creator>
		<pubDate>Fri, 21 Sep 2007 20:05:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.brandonchecketts.com/archives/60#comment-698</guid>

					<description><![CDATA[You can do all of those regexes in one line- something like ...
$term =~ s/([\\\&#039;\&quot;])/\\$1/gi;]]></description>
			<content:encoded><![CDATA[<p>You can do all of those regexes in one line- something like &#8230;<br />
$term =~ s/([\\\&#8217;\&#8221;])/\\$1/gi;</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: pim		</title>
		<link>https://www.brandonchecketts.com/archives/perl-function-equivalent-of-phps-addslashes/comment-page-1#comment-184</link>

		<dc:creator><![CDATA[pim]]></dc:creator>
		<pubDate>Wed, 02 May 2007 09:02:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.brandonchecketts.com/archives/60#comment-184</guid>

					<description><![CDATA[I&#039;m not a Perl programmer but I needed to change the expressions to make it work in my PostgreSQL Perl stored Procedure. 

$text =~ s/\\/\\\\/g;
$text =~ s/&#039;/\\&#039;/g;
$text =~ s/&quot;/\\&quot;/g;
$text =~ s//\/g;]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m not a Perl programmer but I needed to change the expressions to make it work in my PostgreSQL Perl stored Procedure. </p>
<p>$text =~ s/\\/\\\\/g;<br />
$text =~ s/&#8217;/\\&#8217;/g;<br />
$text =~ s/&#8221;/\\&#8221;/g;<br />
$text =~ s//\/g;</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
