in reply to Perl database system

Sounds like homework :) In a complex project like this, it is best to break it down into managable steps. The general steps to take are I can't make sense of the detailed requirements you state, but depending on what they are, you might be able to take some shortcuts. For instance, if the column names and corresponding values are always alphanumeric, these would be easy to distingush from the logical and grouping tokens of a search expression. Also, your task is simple enough that the parsing and executuion steps can be combined (look up syntax-directed translation in your book).

-Mark