in reply to Is a integer or string.

See, among others, Exploiting Perls idea of what is a number, Revealing difference in interpretation of 'number' between Perl and $other_language, is_numeric and replies thereto.

Super Search is your friend.

Aside: IF($value1 == $value2) will give you problems. Perl is case-sensitive. Try if($value1 == $value2).