in reply to Logical expressions

Ultimately you are writing a parser and regexen are only part of the answer. The heavy weight answer is Parse::RecDescent. A (perhaps) slightly easier path for a very simple grammar is to manually write a recursive decent parser. However the easiest way to do that is first write a formal grammar, then write a sub for each element of the grammar. Since the first part is essentially the input to Parse::RecDescent and the second part is what the module does for you, you don't gain a lot by rolling your own. ;)


DWIM is Perl's answer to Gödel