Perl provides two sets of comparison operators: one set for working with numbers and one set for working with strings.
Numbers | Strings |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Do not use the number comparison operators on nonnumeric strings. Likewise, do not use the string comparison operators on numbers.
...
Confusing the string comparison operators with numeric comparison operators can lead to incorrect program behavior or incorrect program data.
Recommendation | Severity | Likelihood | Remediation Cost | Priority | Level |
|---|---|---|---|---|---|
EXP35-PL | Low | Likely | Low | P9 | L2 |
Automated Detection
Tool | Diagnostic |
|---|---|
Perl::Critic | ValuesAndExpressions::ProhibitMismatchedOperators |
DoubledPrefix |
Bibliography
...
...