in reply to Re^2: check if a number is in a list
in thread check if a number is in a list
OP, in both cases above, the idea is to have the numbers in your list to actually be in a hash rather than an array. The map and @array{@array} thing are simply shorthand ways to take your existing array and make it into a hash.
Depending on your actual implementation, you might be better off if you created and added/removed the numbers meant to be within the list, and did so using hash operations instead. Then you wouldn't need the shorthand idioms above.
-Scott
|
|---|