Dan:
Looks good. Note that you don't need to set a value for $pi because you never use it. In any case, there is already a variable $PI that contains the most precise version that perl can store, and there is also a function pi that returns the same value, so there is no need ever to write it out by hand.
Davide
WeBWorK Main Forum
Help with programming a particular problem
This forum has a limit to the number of forum postings you can make in a given time period - this is currently set at 10 posting(s) in 1 day