|
When using compares with strings,
also make sure you use "eq" and "ne" (equal and not-equal)
instead of ==
for strings:
if($string1 eq $string2){ print "they are equal.";}
if($string1 ne "orange"){ print "they are NOT equal.";}
for integers:
if($xpos == $ypos){ print "the two positions are equal.";}
I don't know if this helps with your question,
but just something to keep in mind.
|