in reply to Conditional Elimination
There may be all kinds of ways to condense the clauses, but while that may save on the number of lines, just listing them is probably the simplest, and easiest to understand.if ($a eq "A" && $b eq "C" && $p != 1 && $s ne "P") { return "12341"; }
The latter example could be written as
but I'd only write that if it's really intended that $p is inside a range (and an integer), instead of one of 4 values that just happened to be in a row.if ($a eq "A" && $p >= 88 && $p <= 91) { return $p; }
|
|---|