module for parsing a string into a formula



Sorry if I'm not saying this right...

I am coming from a C++ environment, that newsgroup suggested PERL as a
possible answer for my need. I have no experience with PERL at all, so will
have to do my homework if someone says there is a way.

I need a function ( module? ) that can take a string expression "(1 + 2) *
(3 + 4)" and return the answer of "21". It can be either a numerical value,
or a string value does not matter from this point.

Any pointers in the right direction would be welcome. A commercial software
package would be acceptable as well.

Thank you in advance

Michael
.