tmy05,
Well, you might be able to adapt a ready made solution if you forced a grammar that already had a pre-existing parser (like Reverse Polish Notation). Other than that, you will need to define your own parser (perhaps using
Parse::RecDescent). Of course, there is always the dangerous method of s/// and eval.