My solution is wrong, but for different reasons. eq cannot replace ==:
$a = "01000"; $b = 1000; printf "\$a eq \$b : %s\n", $a eq $b; printf "\$a == \$b : %s\n", $a == $b;
use strict; has no bearing on comparisons. What you are thinking of is use warnings;, which will warn about non-numeric values being compared with ==.
In reply to Re^3: check if 2 values are equal
by Corion
in thread check if 2 values are equal
by eXile
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |