If for some reason you are forced to have the set be an array (say you need to keep the order, or you are being passed this array from some module outside of your control), but you will be doing numerous (i.e. more than one) membership tests, it might be worthwhile converting it to a hash-based set, and doing your membership tests on the hash (via exists($hashset{$a})%hashset = map {$_=>1} @arrayset;
In reply to Re: Set Operators
by jsegal
in thread Set Operators
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |