On 7/15/06, Daniel D Jones <[EMAIL PROTECTED]> wrote:

my @variables = [3, 7, 13, 4, 12];
my @tests = ("2*a+b==c", "c-d+a==e");

I need to be able to evaluate the mathematical truth of the tests,

May I suggest Parse::RecDescent? If you can make a grammar out of your
algebra, you'll have an easy time getting the job done. In fact,
search around: Somebody else probably has an algebraic parser that you
can start from.

Good luck with it!

--Tom Phoenix
Stonehenge Perl Training

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to