I think OP's original code is fine in this regard.
Whoops, I missed the missing or die in the second open. Nevermind that sentence.
In reply to Re^3: Passing variable to if statement
by Anonymous Monk
in thread Passing variable to if statement
by PeachCityDude
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |