in reply to Seeking Advice: Writing a parser

I highly recommend you use Parse::RecDescent. It has an <autotree> directive which, although it doesn't work exactly as you describe, builds a tree that's probably better for your purposes:
+ / \ / \ / \ tan * | / \ ^ 2 sin / \ | x 4 x
The advantage of this tree is that you can just do a postorder traversal with a number stack to run it. Of course, if you really like the tree design you describe above, you can also just provide the tree-building actions yourself instead of using <autotree>.

=cut
--Brent Dax
There is no sig.