Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Oracle IN like operator in Perl

by amir_e_a (Hermit)
on Dec 28, 2009 at 19:07 UTC ( [id://814651]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://814651]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2024-04-20 04:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found