A hash is better than an array or quickly checking of whether an item is included. If you can keep the set of candidates around as a hash with candidates as keys instead of an array of candidates, you can check whether a key is one of the candidates with exists.use Quantum::Superpositions; if ( $x == any(1,3,7) ) { ... }
blokhead
In reply to Re: writing perl function like sql IN
by blokhead
in thread writing perl function like sql IN
by JAMBOID
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |