in reply to Too much SQL not enough perl

In a DB application, the solution with SQL in operator is in deed a decent one.

If you can avoid coding, just avoid it, no matter through SQL or Perl.

If you happened to have a hash that logically fits your purpose, the exists() function might help. But in operator is much more handy. Think in this way, what if the selection is indeed the result of a sub query. Do you want to write the whole logic yourself, or just use SQL query.