<?xml version="1.0" encoding="windows-1252"?>
<node id="872624" title="Re: Comparing two directories and then exiting from the script" created="2010-11-19 22:22:11" updated="2010-11-19 22:22:11">
<type id="11">
note</type>
<author id="769448">
biohisham</author>
<data>
<field name="doctext">
&lt;blockquote&gt;&lt;i&gt;Argument "E:/perl/scripts" isn't numeric in numeric ne (!=) at orphan_check.pl line 26&lt;/i&gt;&lt;/blockquote&gt;
Of course this argument is not numeric because "E:/perl/scripts" is not a number, hence you were offered the operator 'ne' instead of the one you tried to use '!='.
&lt;p&gt;
You have to decide whether your operand(s) is in numeric context or a string context. In Perl it makes a difference and using an operator in a context that is it not applicable could give out such warnings.
&lt;/p&gt;
&lt;p&gt;
'&lt;c&gt;lt, gt, le, ge, eq, ne, cmp&lt;/c&gt;' perform on strings similar operations performed by '&lt;c&gt;&lt;, &gt;, &lt;=, &gt;=, ==, !=, &lt;=&gt;'&lt;/c&gt; respectively on numbers
&lt;/p&gt;
On a further note, be careful with treating strings as numbers because perl can force into a number any string that has been treated that way, an example will include using the arithmetic operators on strings, they will be reinitialized to zero..
&lt;c&gt;
my $string = "lion";
my $result = $string + 2;
print $result;
&lt;/c&gt;
'$string' was reinitialized to 0... These are some errors that may just be hard to detect if you chose to ignore warnings given to you..
&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;
&lt;code&gt;
&lt;/code&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-769448"&gt;
&lt;hr&gt;
Excellence is an Endeavor of Persistence.
A Year-Old Monk :D .
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
872611</field>
<field name="parent_node">
872611</field>
</data>
</node>
