Subject: | ValuesAndExpressions::ProhibitMismatchedOperators: understand rand() |
I expected the following code to give a 'mismatched operator' message:
my $x = 0.1;
if (rand() lt $x) {
print "yes\n";
}
The ValuesAndExpressions::ProhibitMismatchedOperators policy should
understand that rand() returns a numeric value and so it is not correct
to use it with lt, gt, and so on.