$x=15; $x.=4; $x+=2; # ==> 156 #### $temp1=eval { 0+$value1 }; $temp1=$value1 if $@; Perl says it is not a number $temp2=eval { 0+$value2 }; $temp2=$value2; # By virtue of eval, we can now use string equality # even if the values were numbers before. if ($temp1 eq $temp2) { ... }