note
arturo
<p>Read [perldiag] for an explanation of the error message; the error message does not lie, you're attempting to compare values, at least one of which is undefined. There's only one comparison in the code you post, so assuming that's the "offending" line, the problem is that one of <code>$a</code> and <code>$b</code> is not initialized in the call to <code>sum</code>. Why that would be so depends on how that subroutine came to be called, and if you look at the <code>else</code> clause of your conditional in the <code>sum</code> subroutine, you'll see the problem; what you pass to the call to <code>sum</code> there are three things: <code>$term</code>, and the results of calling the sub it points to on <code>$a</code> and <code>$b</code>. Yet your subroutine's ... ummm... signature calls for there to be four objects, so the result is that when that recursive call is made, <code>$b</code> is undefined.</p>
<p>HTH</p>
<p class="mysig">If not P, what? Q maybe? <br />"Sidney Morgenbesser"</p>
256648
256663