<?xml version="1.0" encoding="windows-1252"?>
<node id="728713" title="Re^2: Little annoying mistakes ... of others" created="2008-12-07 09:25:27" updated="2008-12-07 09:25:27">
<type id="11">
note</type>
<author id="594562">
Porculus</author>
<data>
<field name="doctext">
&lt;blockquote&gt;Can be written &lt;c&gt;chomp(my $line = &lt;STDIN&gt;);&lt;/c&gt; ;D&lt;/blockquote&gt;&lt;p&gt;But that doesn't generalise for all rvalue uses.  For example, I frequently want to write something like&lt;/p&gt;
&lt;c&gt;frobnicate(chomp) while &lt;$file&gt;;     # doesn't work&lt;/c&gt;
&lt;p&gt;and am of course instead forced to write the loop out longhand, since&lt;/p&gt;
&lt;c&gt;chomp, frobnicate($_) while &lt;$file&gt;; # yuck&lt;/c&gt;
&lt;p&gt;is starting to get hard to read.&lt;/p&gt;
&lt;p&gt;Personally I consider this a failure in Perl's Huffman coding.  I can't think of a single case where I've cared in the slightest how many characters &lt;c&gt;chomp&lt;/c&gt; removed, but I do want to be able to chomp something and then immediately pass the chomped value to some other routine.&lt;/p&gt;</field>
<field name="root_node">
728569</field>
<field name="parent_node">
728581</field>
</data>
</node>
