in reply to Parsing a Formula

Take a look at Math::Expr. That may be what you are looking for.

HTH