Debugging a complex calculation
Problem
You need to determine why a calculation does not work.
Solution
Use "print" commands in an anonymous subroutine structure.
Discussion
We realize this discussion is technical; so are complex calculations.
Most of the problems with complex calculations have to do with the absence of the dollar sign as prefix to variable names (required in the Perl context), with variables not being properly initialized and with improper mathematical syntax. Therefore, use the following debugging guidelines.