<?xml version="1.0" encoding="windows-1252"?>
<node id="482960" title="Re^5: On Commenting Out 'use strict;'" created="2005-08-11 10:02:47" updated="2005-08-15 09:30:08">
<type id="11">
note</type>
<author id="180961">
Limbic~Region</author>
<data>
<field name="doctext">
[bofh_of_oz],
&lt;br /&gt;
Ok, I am a big advocator of using the [doc://strict] and [doc://warnings] pragmas as well as the [doc://diagnostics] when necessary.  With that said, how does a novice distinguish between a warning an error.  Consider the following 1 liner
&lt;CODE&gt;
perl -e "my $foo; my $bar = 3; $bar += $foo; print $bar"
versus
perl  -Mwarnings -e "my $foo; my $bar = 3; $bar += $foo; print $bar"
&lt;/CODE&gt;
Perl's DWYMery silently converts undef to 0 for us without warnings producing the correct answer in both cases but with warnings it &lt;i&gt;warns&lt;/i&gt; me of a &lt;i&gt;potential&lt;/i&gt; problem.  In fact, Perl isn't consistent in its warnings:
&lt;CODE&gt;
# ++ is a short cut for $foo = $foo + 1
perl  -Mwarnings -e "my $foo; $foo++; print $foo"
&lt;/CODE&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-180961"&gt;
&lt;p&gt;
Cheers - [Limbic~Region|L~R]
&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
482733</field>
<field name="parent_node">
482954</field>
</data>
</node>
