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,
lin0In reply to Re^3: Equality checking for strings AND numbers
by lin0
in thread Equality checking for strings AND numbers
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |