in reply to Simple algebraic calculations

Since you mention algebraic in the title (but not in the body) of your question, I feel I have to ask: are you actually doing algebraic (symbolic) calculations?

If yes, you should use a proper computer algebra system (Mathematica, Maple, Maxima, yacas, ...). Despite all the love for Perl, using a tool better suited for the job will save you lots of time and trouble.

If no, Physics::Unit might be worth considering for the units management. I haven't use it before, but looks quite comprehensive to me.

Regarding the repetitive aspect, it's a good idea to factor commonly use things out into subroutines, and collect them in a module. That way, repetitiveness reduces over time.

Replies are listed 'Best First'.
Re^2: Simple algebraic calculations
by wanna_code_perl (Friar) on Apr 19, 2014 at 16:19 UTC
    If yes, you should use a proper computer algebra system (Mathematica, Maple, Maxima, yacas, ...). Despite all the love for Perl, using a tool better suited for the job will save you lots of time and trouble.

    Perhaps you are right. With all the difficulty I had coming up with a compelling example for discussion, that's probably a symptom of me trying to shove a square peg in a round hole. Yes, symbolic calculations would simplify most of what I'm doing, so maybe I should indeed use a full math language--I can always glue in a bit of Perl if absolutely necessary. Thank you.