if ( (( x - y ) / x ) * (( x - y ) / x ) > 0.001 * 0.001 ){ ## they are different } #### print "$x and $y are different\n" if ( $x ne $y );