http://qs1969.pair.com?node_id=814651


in reply to Oracle IN like operator in Perl

~~, the Smatch Match Operator introduced in Perl 5.10 and already mentioned by JavaFan is probably the best thing for you. See Smart matching in detail in the Perl documentation for more details.

It only works in Perl 5.10 and later. If you are using an earlier version, you should consider upgrading.

If you can't upgrade, grep and the functions in List::Util and List::MoreUtil may do what you need. Note that grep has a performance price, as it always goes over the entire list, but on small lists it's not significant.