Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I think you can do away with the third condition of ($val1 == $val2).
First, the eq should catch differences between numbers equally well as the ==. See Comparing values. Secondly, the == would fail (under strict) if one of the values were a string. For eq to work for numbers, you need to know that the values are being represented internally as numbers, for instance:
In reply to Re^2: check if 2 values are equal
by clinton
|
|