in reply to IF Statement Testing
If you're looking to exclude specific values (not necessarily contiguous), then here is another way to solve your problem:
if (scalar grep { $expire ne $_ } @values) { die "Don't tamper with m +e!"; }
Where @values is filled with the values you want to check for. Also, if you are doing only numbers you can change the ne test to a != test.
Update: Added italics to "another" to emphasize TMTOWTDI. For further insight into TMTOWTDI (and why algorithms, unlike men, are not all created equal), might I suggest reading the chain of replies resulting from this post.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: IF Statement Testing
by davido (Cardinal) on May 14, 2005 at 15:41 UTC | |
by northwind (Hermit) on May 14, 2005 at 18:37 UTC |