Yes, you can use grep, but that means doing a linear search that only exits after stepping through all elements, even if the first element found satisfies the criteria. If this conditional is to be tested repeatedly, doing a hashtable lookup is more elegant and more efficient...and depending on who you ask, easier on the eyes.
Dave
In reply to Re^2: IF Statement Testing
by davido
in thread IF Statement Testing
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |