in reply to Re^2: Equality checking for strings AND numbers
in thread Equality checking for strings AND numbers
http://search.cpan.org/~dwheeler/Data-Types-0.06/lib/Data/Types.pm.
With this you should be able to get it to at least the same variable type. If both become float types and and you compare 10.0 to 10.00, you should end up with equality... Another though that you can do is set up a tolerance for precision on number comparisons;
Instead of if a == b
do if (absolute value of (a - b)) > .0001 then .....
Just some thoughts. I personally haven't done a lot with Perl yet.
|
---|