K
Ken Sington
In general, which "if" is better practice?
Or does it depend on what you'd like to do?
Or it doesn't matter; it's a matter of taste?
I think both of these do the same.
=======================================
$test = checkMe($var);
if ($test eq "good") {
#pass
}
=======================================
if (checkMe($var) eq "good") {
#pass
}
=======================================
checkMe() is a pseudo function
Or does it depend on what you'd like to do?
Or it doesn't matter; it's a matter of taste?
I think both of these do the same.
=======================================
$test = checkMe($var);
if ($test eq "good") {
#pass
}
=======================================
if (checkMe($var) eq "good") {
#pass
}
=======================================
checkMe() is a pseudo function