<DIV>Don't forget too that perl has a built in parser - you can sub in strings then eval the string.</DIV>
<DIV>i.e.</DIV>
<DIV>my $str = "-foo bar -a ( -bar stool -o -bar tab )";<BR>$str =~ s/\s-a\s/ and /g;<BR>$str =~ s/\s-o\s/ or /g;<BR>$str =~ s/-foo\s+(\w+)/foo('$1')/g;<BR>$str =~ s/-bar\s+(\w+)/bar('$1')/g;</DIV>
<DIV>print "$str\n";<BR>my $results = eval $str;<BR>print "Results = $results\n";</DIV>
<DIV>sub foo {<BR>&nbsp;my $arg = shift;<BR>&nbsp;return 1 if $arg eq 'bar';<BR>&nbsp;return 0;<BR>}</DIV>
<DIV>sub bar {<BR>&nbsp;my $arg = shift;<BR>&nbsp;return 1 if ( $arg eq 'stool' or $arg eq 'drink' );<BR>&nbsp;return 0;<BR>}<BR><BR></DIV><p><font face=arial size=-1>Do you Yahoo!?<br>
<a href="http://taxes.yahoo.com/filing.html"><b>Yahoo! Finance Tax Center</a></b> - File online. File on time.