http://qs321.pair.com?node_id=626424


in reply to Re^2: Equality checking for strings AND numbers
in thread Equality checking for strings AND numbers

when comparing numbers, I tend to avoid using == to go for something like:

sub equality{ my ($a, $b, $eps) = @_; abs( $a-$b ) < $eps ? return 1: return 0; }

where $eps is the desired precision

Cheers,

lin0