You last reply was very helpful! Running the test code manually, my debug print statements in the *.pl file show that the @answer array continues to contain the values from previous calls:
Test 1. @answer array returns 180 59 58 (test passes).
Test 2. @answer array returns 179 1 9 180 59 58 (test fails).
Test 3. @answer array returns 180 0 0 179 1 9 180 59 58 (test fails).
I tried adding
my @answer = undef;
to the test file main sub definition (thinking that this would get cleared on every call) but that did not work. What do you suggest now?