I believe what your asking is far more difficult than coding simple one variable polynomials, as essentially you seem to be placing no limitations on the operators or even the number of variables. You're talking about building a symbolic math manipulation tool. Perhaps this will help: Math::Symbolic?
I'd like to be able to assign to an luser
Re: solving system of equations with complex expressions