<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.2" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Five great Perl programming techniques to make your life fun again</title>
	<link>http://www.xaprb.com/blog/2006/10/05/five-great-perl-programming-techniques-to-make-your-life-fun-again/</link>
	<description>Stay curious!</description>
	<pubDate>Sat, 06 Sep 2008 02:01:27 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.2</generator>

	<item>
		<title>By: John W. Krahn</title>
		<link>http://www.xaprb.com/blog/2006/10/05/five-great-perl-programming-techniques-to-make-your-life-fun-again/#comment-14151</link>
		<author>John W. Krahn</author>
		<pubDate>Sun, 13 Jan 2008 03:08:30 +0000</pubDate>
		<guid>http://www.xaprb.com/blog/2006/10/05/five-great-perl-programming-techniques-to-make-your-life-fun-again/#comment-14151</guid>
		<description>bvm wrote: "The &#124;&#124;= operator was a new one to me, but I’m not terribly tempted to use it, since it’s a little bit too terse — I worry about other readers of my code not understanding it. I find the alternative $a = 5 unless $a; more readable, and it’s completely equivalent."

This is not "completely equivalent" because the &#124;&#124; operator short-circuits, it only evaluates the right-hand side of the operator if the left-hand side is false whereas the other method would always evaluate the right-hand side.</description>
		<content:encoded><![CDATA[<p>bvm wrote: &#8220;The ||= operator was a new one to me, but I’m not terribly tempted to use it, since it’s a little bit too terse — I worry about other readers of my code not understanding it. I find the alternative $a = 5 unless $a; more readable, and it’s completely equivalent.&#8221;</p>
<p>This is not &#8220;completely equivalent&#8221; because the || operator short-circuits, it only evaluates the right-hand side of the operator if the left-hand side is false whereas the other method would always evaluate the right-hand side.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sapphirecat</title>
		<link>http://www.xaprb.com/blog/2006/10/05/five-great-perl-programming-techniques-to-make-your-life-fun-again/#comment-13525</link>
		<author>sapphirecat</author>
		<pubDate>Sun, 14 Oct 2007 02:31:20 +0000</pubDate>
		<guid>http://www.xaprb.com/blog/2006/10/05/five-great-perl-programming-techniques-to-make-your-life-fun-again/#comment-13525</guid>
		<description>Trick 5 gets extra tricky when you throw in the ability of the functions in the dispatch table to close over lexical variables. The dispatch table essentially becomes an object in that case. You can find my implementation of objects based on that idea here: http://www.sapphirepaw.org/pawprints/index.php?/archives/135-Objects,-functional-style.html

Thanks for such a thought-provoking post :)</description>
		<content:encoded><![CDATA[<p>Trick 5 gets extra tricky when you throw in the ability of the functions in the dispatch table to close over lexical variables. The dispatch table essentially becomes an object in that case. You can find my implementation of objects based on that idea here: <a href="http://www.sapphirepaw.org/pawprints/index.php?/archives/135-Objects,-functional-style.html" rel="nofollow">http://www.sapphirepaw.org/pawprints/index.php?/archives/135-Objects,-functional-style.html</a></p>
<p>Thanks for such a thought-provoking post :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: christian schorn &#187; Blog Archive &#187; Links vom 09.10.2007</title>
		<link>http://www.xaprb.com/blog/2006/10/05/five-great-perl-programming-techniques-to-make-your-life-fun-again/#comment-13504</link>
		<author>christian schorn &#187; Blog Archive &#187; Links vom 09.10.2007</author>
		<pubDate>Tue, 09 Oct 2007 21:22:43 +0000</pubDate>
		<guid>http://www.xaprb.com/blog/2006/10/05/five-great-perl-programming-techniques-to-make-your-life-fun-again/#comment-13504</guid>
		<description>[...] Five great Perl programming techniques to make your life fun again at Xaprb Simpel, aber effektiv [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] Five great Perl programming techniques to make your life fun again at Xaprb Simpel, aber effektiv [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Xaprb</title>
		<link>http://www.xaprb.com/blog/2006/10/05/five-great-perl-programming-techniques-to-make-your-life-fun-again/#comment-13495</link>
		<author>Xaprb</author>
		<pubDate>Mon, 08 Oct 2007 17:12:45 +0000</pubDate>
		<guid>http://www.xaprb.com/blog/2006/10/05/five-great-perl-programming-techniques-to-make-your-life-fun-again/#comment-13495</guid>
		<description>I actually didn't mention grep when I originally wrote the article -- I just added that today.  I was trying to keep it as simple as possible so it didn't have any complicated syntax to obscure the concept of map.  But as Randal pointed out, I chose a bad example, and I wanted to replace that today but can't think of a good example that's super-simple.

It's kind of odd to look back at this, which I wrote a year ago and became popular just yesterday because of Reddit.  If I were writing it from scratch today I'd have a different approach, tone, and attitude.  Re-reading this has been as educational as anything for me.</description>
		<content:encoded><![CDATA[<p>I actually didn&#8217;t mention grep when I originally wrote the article &#8212; I just added that today.  I was trying to keep it as simple as possible so it didn&#8217;t have any complicated syntax to obscure the concept of map.  But as Randal pointed out, I chose a bad example, and I wanted to replace that today but can&#8217;t think of a good example that&#8217;s super-simple.</p>
<p>It&#8217;s kind of odd to look back at this, which I wrote a year ago and became popular just yesterday because of Reddit.  If I were writing it from scratch today I&#8217;d have a different approach, tone, and attitude.  Re-reading this has been as educational as anything for me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://www.xaprb.com/blog/2006/10/05/five-great-perl-programming-techniques-to-make-your-life-fun-again/#comment-13494</link>
		<author>John</author>
		<pubDate>Mon, 08 Oct 2007 17:02:36 +0000</pubDate>
		<guid>http://www.xaprb.com/blog/2006/10/05/five-great-perl-programming-techniques-to-make-your-life-fun-again/#comment-13494</guid>
		<description>Another safer option would be to use a regexp instead of split.  This will ignore elements that don't have the delimiter and split on the first if there are multiple:

my $input = "a1,b:2,d:3,e:f:g";
my %output = map { m/(.*?):(.*)/ } split(/,/, $input);

But that doesn't let you demonstrate grep.</description>
		<content:encoded><![CDATA[<p>Another safer option would be to use a regexp instead of split.  This will ignore elements that don&#8217;t have the delimiter and split on the first if there are multiple:</p>
<p>my $input = &#8220;a1,b:2,d:3,e:f:g&#8221;;<br />
my %output = map { m/(.*?):(.*)/ } split(/,/, $input);</p>
<p>But that doesn&#8217;t let you demonstrate grep.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Xaprb</title>
		<link>http://www.xaprb.com/blog/2006/10/05/five-great-perl-programming-techniques-to-make-your-life-fun-again/#comment-13492</link>
		<author>Xaprb</author>
		<pubDate>Mon, 08 Oct 2007 16:09:48 +0000</pubDate>
		<guid>http://www.xaprb.com/blog/2006/10/05/five-great-perl-programming-techniques-to-make-your-life-fun-again/#comment-13492</guid>
		<description>Your point is well made.  I'll edit the article to be generic and not refer to this specific way of reinventing the wheel badly.</description>
		<content:encoded><![CDATA[<p>Your point is well made.  I&#8217;ll edit the article to be generic and not refer to this specific way of reinventing the wheel badly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Randal L. Schwartz</title>
		<link>http://www.xaprb.com/blog/2006/10/05/five-great-perl-programming-techniques-to-make-your-life-fun-again/#comment-13491</link>
		<author>Randal L. Schwartz</author>
		<pubDate>Mon, 08 Oct 2007 16:03:43 +0000</pubDate>
		<guid>http://www.xaprb.com/blog/2006/10/05/five-great-perl-programming-techniques-to-make-your-life-fun-again/#comment-13491</guid>
		<description>The phrase "map { split(/=/, $_) }" is dangerous, since you're assigning to a hash, and the split can return a variable number of values.  What if it returns 3 or 4 instead of just 2, because $_ might contain "foo=bar=bletch" for example?

Besides, it's a bad example in that you're supposed to use the URI stuff anyway to break apart form data.  I know, you hope that nobody uses the code literally, but if you post an article, people *will* misuse your code literally.  And that's how bad code gets spread.</description>
		<content:encoded><![CDATA[<p>The phrase &#8220;map { split(/=/, $_) }&#8221; is dangerous, since you&#8217;re assigning to a hash, and the split can return a variable number of values.  What if it returns 3 or 4 instead of just 2, because $_ might contain &#8220;foo=bar=bletch&#8221; for example?</p>
<p>Besides, it&#8217;s a bad example in that you&#8217;re supposed to use the URI stuff anyway to break apart form data.  I know, you hope that nobody uses the code literally, but if you post an article, people *will* misuse your code literally.  And that&#8217;s how bad code gets spread.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sajal Dutta</title>
		<link>http://www.xaprb.com/blog/2006/10/05/five-great-perl-programming-techniques-to-make-your-life-fun-again/#comment-13488</link>
		<author>Sajal Dutta</author>
		<pubDate>Mon, 08 Oct 2007 06:36:04 +0000</pubDate>
		<guid>http://www.xaprb.com/blog/2006/10/05/five-great-perl-programming-techniques-to-make-your-life-fun-again/#comment-13488</guid>
		<description>It's just a great article.. Thankz..</description>
		<content:encoded><![CDATA[<p>It&#8217;s just a great article.. Thankz..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Xaprb</title>
		<link>http://www.xaprb.com/blog/2006/10/05/five-great-perl-programming-techniques-to-make-your-life-fun-again/#comment-13484</link>
		<author>Xaprb</author>
		<pubDate>Sun, 07 Oct 2007 21:27:59 +0000</pubDate>
		<guid>http://www.xaprb.com/blog/2006/10/05/five-great-perl-programming-techniques-to-make-your-life-fun-again/#comment-13484</guid>
		<description>Likewise, don't take it personally -- I saw I got linked from reddit somehow (???) and wanted to state my position on comments in case that ended up sending a lot of traffic :)  I'm not upset.

Thank you for your comment!</description>
		<content:encoded><![CDATA[<p>Likewise, don&#8217;t take it personally &#8212; I saw I got linked from reddit somehow (???) and wanted to state my position on comments in case that ended up sending a lot of traffic :)  I&#8217;m not upset.</p>
<p>Thank you for your comment!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Txberiu</title>
		<link>http://www.xaprb.com/blog/2006/10/05/five-great-perl-programming-techniques-to-make-your-life-fun-again/#comment-13483</link>
		<author>Txberiu</author>
		<pubDate>Sun, 07 Oct 2007 21:21:49 +0000</pubDate>
		<guid>http://www.xaprb.com/blog/2006/10/05/five-great-perl-programming-techniques-to-make-your-life-fun-again/#comment-13483</guid>
		<description>I was just trolling, don't take it personally. Let's try this again..

It is nice to see functional concepts such as map and dispatch tables get attention in traditionally non-functional languages, as they tend to irreversibly alter the way one thinks about code. Good job promoting these features!</description>
		<content:encoded><![CDATA[<p>I was just trolling, don&#8217;t take it personally. Let&#8217;s try this again..</p>
<p>It is nice to see functional concepts such as map and dispatch tables get attention in traditionally non-functional languages, as they tend to irreversibly alter the way one thinks about code. Good job promoting these features!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
