<?xml version="1.0" encoding="windows-1252"?>
<node id="728581" title="Re: Little annoying mistakes ... of others" created="2008-12-06 13:02:01" updated="2008-12-06 13:02:01">
<type id="11">
note</type>
<author id="694676">
Lawliet</author>
<data>
<field name="doctext">
&lt;c&gt;
my $line = &lt;STDIN&gt;;
chomp $line;
&lt;/c&gt;
&lt;p&gt;Can be written &lt;c&gt;chomp(my $line = &lt;STDIN&gt;);&lt;/c&gt; ;D&lt;/p&gt;
&lt;p&gt;Anyway, a pet peeve of mine would be people writing a program in Perl as if they were writing a program in C (or C++, etc). I.e., using C-style for loops when a foreach would work much better. Or, something even more annoying, putting the curlies in the same vertical column~&lt;/p&gt;
&lt;c&gt;
for (my $i = 0; $i &lt; $#names; $i++)
{
    print $names[$i];
}
&lt;/c&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-694676"&gt;
&lt;small&gt;&lt;p&gt;I'm so adjective, I verb nouns!&lt;/p&gt;&lt;p&gt;chomp; # nom nom nom&lt;/p&gt;&lt;/small&gt;
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
728569</field>
<field name="parent_node">
728569</field>
</data>
</node>
