in reply to Re: writing perl function like sql IN
in thread writing perl function like sql IN

A slightly more efficient solution (see the discussion below) would use the standard List::Util::first function:
if (defined first { $x == $_ } 1, 3, 7) { ... }
Note that it is necessary to use defined(), as first() returns the first matching element (which may be zero), not a list.